diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-23 20:46:29 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-23 20:46:29 +1000 |
| commit | 7eca144a8f4748946f1141e39066cdbcbac97e17 (patch) | |
| tree | d433f7a2c3bcb48b35886f2bb136b30486a304ef | |
| parent | af52eb32dcd641d0bab1a8bbab967996fae76594 (diff) | |
tests: Test image functions (fail)
| -rw-r--r-- | tests/test_image.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_image.py b/tests/test_image.py index e0b7902..1cf7ec6 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -16,6 +16,16 @@ class TestImage(unittest.TestCase): result = image.get("tests/test_files") self.assertEqual(result.endswith(".jpg"), True) + def test_get_img_fail(self): + """> Validate image file. (fail)""" + with self.assertRaises(SystemExit): + image.get("tests/test_files/test_fail.jpg") + + def test_get_img_dir_fail(self): + """> Validate image directory. (fail)""" + with self.assertRaises(SystemExit): + image.get("tests") + if __name__ == "__main__": unittest.main() |
