summaryrefslogtreecommitdiff
path: root/test/test.py
diff options
context:
space:
mode:
authorjvoisin2011-07-30 21:47:31 +0200
committerjvoisin2011-07-30 21:47:31 +0200
commit5715ba52f2238af513b0b87f4aa3c0158d2c84ba (patch)
treee77829efd78b1473650a669546c3c11edc37932c /test/test.py
parentc9cb00bdf702ce6663e78784de63dc6d35c3d875 (diff)
Documentation, and removal of unnecessary imports
Diffstat (limited to 'test/test.py')
-rw-r--r--test/test.py22
1 files changed, 9 insertions, 13 deletions
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
12import tempfile 12import tempfile
13import unittest 13import unittest
14 14
15sys.path.append('..')
16from lib import mat
17
18VERBOSITY = 3 15VERBOSITY = 3
19FILE_LIST = zip(glob.glob('clean*'), glob.glob('dirty*')) 16FILE_LIST = zip(glob.glob('clean*'), glob.glob('dirty*'))
20 17
21class MATTest(unittest.TestCase): 18class MATTest(unittest.TestCase):
22 def setUp(self):
23 '''
24 Create working copy of the clean and the dirty file in the TMP dir
25 ''' 19 '''
20 Parent class of all test-functions
21 '''
22 def setUp(self):
23 '''
24 Create working copy of the clean and the dirty file in the TMP dir
25 '''
26 self.file_list = [] 26 self.file_list = []
27 self.tmpdir = tempfile.mkdtemp() 27 self.tmpdir = tempfile.mkdtemp()
28 28
29 for clean, dirty in FILE_LIST: 29 for clean, dirty in FILE_LIST:
30 shutil.copy2(clean, self.tmpdir + os.sep + clean) 30 shutil.copy2(clean, self.tmpdir + os.sep + clean)
31 shutil.copy2(dirty, self.tmpdir + os.sep + dirty) 31 shutil.copy2(dirty, self.tmpdir + os.sep + dirty)
32
33 self.file_list.append((self.tmpdir + os.sep + clean, 32 self.file_list.append((self.tmpdir + os.sep + clean,
34 self.tmpdir + os.sep + dirty)) 33 self.tmpdir + os.sep + dirty))
35 34
36 def tearDown(self): 35 def tearDown(self):
37 ''' 36 '''
38 Remove the tmp folder 37 Remove the tmp folder
39 ''' 38 '''
40 for clean, dirty in self.file_list:
41 mat.secure_remove(clean)
42 mat.secure_remove(dirty)
43 shutil.rmtree(self.tmpdir) 39 shutil.rmtree(self.tmpdir)