diff options
| author | jvoisin | 2014-02-01 15:44:24 +0000 |
|---|---|---|
| committer | jvoisin | 2014-02-01 15:44:24 +0000 |
| commit | 7f308642294d9b68cda8eba9c2ffb5f14f3843ff (patch) | |
| tree | 548e122a605dbc4b0035eb0604c5d5ab3188b668 /test/libtest.py | |
| parent | d23b55231433c13c0a0e7b62ee460bfdbe8b59cd (diff) | |
Build some testfiles at runtime
Diffstat (limited to 'test/libtest.py')
| -rw-r--r-- | test/libtest.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/test/libtest.py b/test/libtest.py index c2cb2f1..fdef091 100644 --- a/test/libtest.py +++ b/test/libtest.py | |||
| @@ -73,17 +73,15 @@ class TestFileAttributes(unittest.TestCase): | |||
| 73 | ''' | 73 | ''' |
| 74 | test various stuffs about files (readable, writable, exist, ...) | 74 | test various stuffs about files (readable, writable, exist, ...) |
| 75 | ''' | 75 | ''' |
| 76 | def test_not_writtable(self): | ||
| 77 | ''' test MAT's behaviour on non-writable file''' | ||
| 78 | self.assertFalse(MAT.mat.create_class_file('not_writtable', False, add2archive=True)) | ||
| 79 | |||
| 80 | def test_not_exist(self): | 76 | def test_not_exist(self): |
| 81 | ''' test MAT's behaviour on non-existent file''' | 77 | ''' test MAT's behaviour on non-existent file''' |
| 82 | self.assertFalse(MAT.mat.create_class_file('ilikecookies', False, add2archive=True)) | 78 | self.assertFalse(MAT.mat.create_class_file('non_existent_file', False, add2archive=True)) |
| 83 | 79 | ||
| 84 | def test_empty(self): | 80 | def test_empty(self): |
| 85 | ''' test MAT's behaviour on empty file''' | 81 | ''' test MAT's behaviour on empty file''' |
| 82 | open('empty_file', 'a').close() | ||
| 86 | self.assertFalse(MAT.mat.create_class_file('empty_file', False, add2archive=True)) | 83 | self.assertFalse(MAT.mat.create_class_file('empty_file', False, add2archive=True)) |
| 84 | os.remove('empty_file') | ||
| 87 | 85 | ||
| 88 | 86 | ||
| 89 | class TestSecureRemove(unittest.TestCase): | 87 | class TestSecureRemove(unittest.TestCase): |
