diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-22 10:26:36 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-22 10:26:36 +1000 |
| commit | 3dd1fc9039822e4426d5dc8c3f807dd5f6f2d295 (patch) | |
| tree | 1a049e30b262be7355a75c2ab1b17c3a147499c6 /tests/test_image.py | |
| parent | ccad5150e621067ef637104f9a20371bb4533ce8 (diff) | |
tests: Fix tests
Diffstat (limited to 'tests/test_image.py')
| -rw-r--r-- | tests/test_image.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/test_image.py b/tests/test_image.py index bcf3b4d..b9099f9 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -1,20 +1,24 @@ """Test image functions.""" +import pathlib import unittest from pywal import wal +DEVNULL = pathlib.Path("/dev/null") + + class TestImage(unittest.TestCase): """Test image functions.""" def test_get_img(self): """> Validate image file.""" - result = wal.get_image("tests/test_files/test.jpg") + result = wal.get_image("tests/test_files/test.jpg", DEVNULL) 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/test2.jpg") + result = wal.get_image("tests/test_files", DEVNULL) + self.assertEqual(result, "tests/test_files/test.jpg") if __name__ == "__main__": |
