mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-02-01 19:09:38 +01:00
tests: Test image functions (fail)
This commit is contained in:
parent
af52eb32dc
commit
7eca144a8f
@ -16,6 +16,16 @@ class TestImage(unittest.TestCase):
|
|||||||
result = image.get("tests/test_files")
|
result = image.get("tests/test_files")
|
||||||
self.assertEqual(result.endswith(".jpg"), True)
|
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__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
Loading…
Reference in New Issue
Block a user