diff options
Diffstat (limited to 'test/libtest.py')
| -rw-r--r-- | test/libtest.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/libtest.py b/test/libtest.py index ecbc03e..0df584f 100644 --- a/test/libtest.py +++ b/test/libtest.py | |||
| @@ -64,11 +64,24 @@ class TestisCleanlib(test.MATTest): | |||
| 64 | current_file = mat.create_class_file(clean, False, True) | 64 | current_file = mat.create_class_file(clean, False, True) |
| 65 | self.assertTrue(current_file.is_clean()) | 65 | self.assertTrue(current_file.is_clean()) |
| 66 | 66 | ||
| 67 | class TestFileAttributes(unittest.TestCase): | ||
| 68 | ''' | ||
| 69 | test various stuffs about files (readable, writable, exist, ...) | ||
| 70 | ''' | ||
| 71 | def test_not_readable(self): | ||
| 72 | self.assertFalse(mat.create_class_file('not_readable', False, True)) | ||
| 73 | |||
| 74 | def test_not_writtable(self): | ||
| 75 | self.assertFalse(mat.create_class_file('not_writtable', False, True)) | ||
| 76 | |||
| 77 | def test_not_exist(self): | ||
| 78 | self.assertFalse(mat.create_class_file('ilikecookies', False, True)) | ||
| 67 | 79 | ||
| 68 | if __name__ == '__main__': | 80 | if __name__ == '__main__': |
| 69 | Suite = unittest.TestSuite() | 81 | Suite = unittest.TestSuite() |
| 70 | Suite.addTest(unittest.makeSuite(TestRemovelib)) | 82 | Suite.addTest(unittest.makeSuite(TestRemovelib)) |
| 71 | Suite.addTest(unittest.makeSuite(TestListlib)) | 83 | Suite.addTest(unittest.makeSuite(TestListlib)) |
| 72 | Suite.addTest(unittest.makeSuite(TestisCleanlib)) | 84 | Suite.addTest(unittest.makeSuite(TestisCleanlib)) |
| 85 | Suite.addTest(unittest.makeSuite(TestFileAttributes)) | ||
| 73 | unittest.TextTestRunner(verbosity=test.VERBOSITY).run(Suite) | 86 | unittest.TextTestRunner(verbosity=test.VERBOSITY).run(Suite) |
| 74 | 87 | ||
