From 5715ba52f2238af513b0b87f4aa3c0158d2c84ba Mon Sep 17 00:00:00 2001 From: jvoisin Date: Sat, 30 Jul 2011 21:47:31 +0200 Subject: Documentation, and removal of unnecessary imports --- test/clitest.py | 2 -- test/test.py | 22 +++++++++------------- 2 files changed, 9 insertions(+), 15 deletions(-) (limited to 'test') diff --git a/test/clitest.py b/test/clitest.py index f71a622..453333a 100644 --- a/test/clitest.py +++ b/test/clitest.py @@ -8,7 +8,6 @@ import subprocess import sys sys.path.append('..') -#import cli from lib import mat import test @@ -57,7 +56,6 @@ class TestisCleancli(test.MATTest): ''' check if cli.py correctly check if a file is clean or not ''' - #FIXME : use an external file with string as const ? def test_clean(self): '''test is_clean on clean files''' for clean, _ in self.file_list: diff --git a/test/test.py b/test/test.py index ac63f60..227170b 100644 --- a/test/test.py +++ b/test/test.py @@ -12,32 +12,28 @@ import sys import tempfile import unittest -sys.path.append('..') -from lib import mat - VERBOSITY = 3 FILE_LIST = zip(glob.glob('clean*'), glob.glob('dirty*')) class MATTest(unittest.TestCase): - def setUp(self): - ''' - Create working copy of the clean and the dirty file in the TMP dir ''' + Parent class of all test-functions + ''' + def setUp(self): + ''' + Create working copy of the clean and the dirty file in the TMP dir + ''' self.file_list = [] self.tmpdir = tempfile.mkdtemp() for clean, dirty in FILE_LIST: shutil.copy2(clean, self.tmpdir + os.sep + clean) shutil.copy2(dirty, self.tmpdir + os.sep + dirty) - self.file_list.append((self.tmpdir + os.sep + clean, self.tmpdir + os.sep + dirty)) def tearDown(self): - ''' - Remove the tmp folder - ''' - for clean, dirty in self.file_list: - mat.secure_remove(clean) - mat.secure_remove(dirty) + ''' + Remove the tmp folder + ''' shutil.rmtree(self.tmpdir) -- cgit v1.3