summaryrefslogtreecommitdiff
path: root/tests/test_image.py
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2017-07-20 23:39:19 +1000
committerDylan Araps <dylan.araps@gmail.com>2017-07-20 23:39:19 +1000
commit4fd592b7d0a5fcf6674d07f34e6d92051634fc6c (patch)
tree86dc37b60a5411c7a67ca968a1323f37834b22a3 /tests/test_image.py
parentced562e4dfa67ff36d64684dfc0d7335306aeb97 (diff)
tests: Fix tests.
Diffstat (limited to 'tests/test_image.py')
-rw-r--r--tests/test_image.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_image.py b/tests/test_image.py
new file mode 100644
index 0000000..7dacecb
--- /dev/null
+++ b/tests/test_image.py
@@ -0,0 +1,21 @@
+"""Test image functions."""
+import unittest
+
+from pywal import wal
+
+
+class TestImage(unittest.TestCase):
+ """Test image functions."""
+ def test_get_img(self):
+ """> Validate image file."""
+ result = wal.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 = wal.get_image("tests/test_files")
+ self.assertEqual(result, "tests/test_files/test.jpg")
+
+
+if __name__ == "__main__":
+ unittest.main()