diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/clitest.py | 7 | ||||
| -rw-r--r-- | test/libtest.py | 5 |
2 files changed, 12 insertions, 0 deletions
diff --git a/test/clitest.py b/test/clitest.py index bc0a7fd..d877698 100644 --- a/test/clitest.py +++ b/test/clitest.py | |||
| @@ -94,6 +94,13 @@ class TestFileAttributes(unittest.TestCase): | |||
| 94 | stdout, _ = proc.communicate() | 94 | stdout, _ = proc.communicate() |
| 95 | self.assertEqual(str(stdout).strip('\n'), 'Unable to process %s' % 'ilikecookies') | 95 | self.assertEqual(str(stdout).strip('\n'), 'Unable to process %s' % 'ilikecookies') |
| 96 | 96 | ||
| 97 | def test_empty(self): | ||
| 98 | ''' test MAT's behaviour on empty file''' | ||
| 99 | proc = subprocess.Popen(['../mat', 'empty_file'], | ||
| 100 | stdout=subprocess.PIPE) | ||
| 101 | stdout, _ = proc.communicate() | ||
| 102 | self.assertEqual(str(stdout).strip('\n'), 'Unable to process %s' % 'ilikecookies') | ||
| 103 | |||
| 97 | 104 | ||
| 98 | def get_tests(): | 105 | def get_tests(): |
| 99 | ''' Return every clitests''' | 106 | ''' Return every clitests''' |
diff --git a/test/libtest.py b/test/libtest.py index 7b31e3e..ffec63a 100644 --- a/test/libtest.py +++ b/test/libtest.py | |||
| @@ -72,11 +72,16 @@ class TestFileAttributes(unittest.TestCase): | |||
| 72 | test various stuffs about files (readable, writable, exist, ...) | 72 | test various stuffs about files (readable, writable, exist, ...) |
| 73 | ''' | 73 | ''' |
| 74 | def test_not_writtable(self): | 74 | def test_not_writtable(self): |
| 75 | ''' test MAT's behaviour on non-writable file''' | ||
| 75 | self.assertFalse(mat.create_class_file('not_writtable', False, add2archive=True, low_pdf_quality=True)) | 76 | self.assertFalse(mat.create_class_file('not_writtable', False, add2archive=True, low_pdf_quality=True)) |
| 76 | 77 | ||
| 77 | def test_not_exist(self): | 78 | def test_not_exist(self): |
| 79 | ''' test MAT's behaviour on non-existent file''' | ||
| 78 | self.assertFalse(mat.create_class_file('ilikecookies', False, add2archive=True, low_pdf_quality=True)) | 80 | self.assertFalse(mat.create_class_file('ilikecookies', False, add2archive=True, low_pdf_quality=True)) |
| 79 | 81 | ||
| 82 | def test_empty(self): | ||
| 83 | ''' test MAT's behaviour on empty file''' | ||
| 84 | self.assertFalse(mat.create_class_file('empty_file', False, add2archive=True, low_pdf_quality=True)) | ||
| 80 | 85 | ||
| 81 | def get_tests(): | 86 | def get_tests(): |
| 82 | ''' Return every libtests''' | 87 | ''' Return every libtests''' |
