diff options
Diffstat (limited to 'test.py')
| -rwxr-xr-x | test.py | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/test.py b/test.py deleted file mode 100755 index 3138be7..0000000 --- a/test.py +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | ''' | ||
| 2 | Class for the testing suite : | ||
| 3 | - get the list of all test files | ||
| 4 | - create a copy of them on start | ||
| 5 | - remove the copy on end | ||
| 6 | ''' | ||
| 7 | |||
| 8 | import shutil | ||
| 9 | import glob | ||
| 10 | import tempfile | ||
| 11 | import unittest | ||
| 12 | import mat | ||
| 13 | |||
| 14 | FILE_LIST = zip(glob.glob('clean*'), glob.glob('dirty*')) | ||
| 15 | |||
| 16 | class MATTest(unittest.TestCase): | ||
| 17 | def setUp(self): | ||
| 18 | '''create working copy of the clean and the dirty file in the TMP dir''' | ||
| 19 | self.file_list = [] | ||
| 20 | self.tmpdir = tempfile.mkdtemp() | ||
| 21 | |||
| 22 | for clean, dirty in FILE_LIST: | ||
| 23 | shutil.copy2(clean, self.tmpdir + clean) | ||
| 24 | shutil.copy2(dirty, self.tmpdir + dirty) | ||
| 25 | self.file_list.append((self.tmpdir + clean, self.tmpdir + dirty)) | ||
| 26 | |||
| 27 | def tearDown(self): | ||
| 28 | '''Remove the tmp folder''' | ||
| 29 | shutil.rmtree(self.tmpdir) | ||
