"""Test image functions."""
import unittest

from pywal import image


class TestImage(unittest.TestCase):
    """Test image functions."""
    def test_get_img(self):
        """> Validate image file."""
        result = image.get("tests/test_files/test.jpg")
        self.assertEqual(result, "tests/test_files/test.jpg")

    def test_get_img_dir(self):
        """> Validate image directory."""
        result = image.get("tests/test_files")
        self.assertEqual(result.endswith(".jpg"), True)


if __name__ == "__main__":
    unittest.main()

@@ -494,16 +494,356 @@
  True)%0A%0A
+    def test_get_img_fail(self):%0A        %22%22%22%3E Validate image file. (fail)%22%22%22%0A        with self.assertRaises(SystemExit):%0A            image.get(%22tests/test_files/test_fail.jpg%22)%0A%0A    def test_get_img_dir_fail(self):%0A        %22%22%22%3E Validate image directory. (fail)%22%22%22%0A        with self.assertRaises(SystemExit):%0A            image.get(%22tests%22)%0A%0A
 %0Aif __na

Test image functions (fail)