diff options
| author | Dylan Araps <[email protected]> | 2017-07-23 15:37:14 +1000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-07-23 15:37:14 +1000 |
| commit | 0c1d76e2b3611b541316dc8d7eb67f18cec5e7f2 (patch) | |
| tree | aaf8141c62789dcfc4f72af24ae96df71459a084 /tests/test_image.py | |
| parent | Update README.md (diff) | |
| parent | tests: Fix tests (diff) | |
| download | pywal-0c1d76e2b3611b541316dc8d7eb67f18cec5e7f2.tar.xz pywal-0c1d76e2b3611b541316dc8d7eb67f18cec5e7f2.zip | |
Merge pull request #52 from dylanaraps/api
api: Start work on a proper api.
Diffstat (limited to 'tests/test_image.py')
| -rw-r--r-- | tests/test_image.py | 21 |
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..e0b7902 --- /dev/null +++ b/tests/test_image.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("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() |