summaryrefslogtreecommitdiff
path: root/tests/test_colors.py
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2017-06-30 10:10:07 +1000
committerDylan Araps <dylan.araps@gmail.com>2017-06-30 10:10:07 +1000
commit930c3c8e40ca5c563d0414e5057b23ad27aa7cf3 (patch)
tree9d5e58b53cccd15c51fb868179c092702c704738 /tests/test_colors.py
parent6c08e44ca416bfa7637505d5c58b7e6e980a20e6 (diff)
tests: Update tests.
Diffstat (limited to 'tests/test_colors.py')
-rw-r--r--tests/test_colors.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_colors.py b/tests/test_colors.py
new file mode 100644
index 0000000..077600e
--- /dev/null
+++ b/tests/test_colors.py
@@ -0,0 +1,21 @@
+"""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_image("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_image("tests/test_files")
+ self.assertEqual(result, "tests/test_files/test.jpg")
+
+
+if __name__ == "__main__":
+ unittest.main()