diff options
Diffstat (limited to 'tests')
| l--------- | tests/test_files/test2.jpg | 1 | ||||
| -rw-r--r-- | tests/test_image.py | 2 | ||||
| -rwxr-xr-x | tests/test_magic.py | 2 | ||||
| -rwxr-xr-x | tests/test_template.py (renamed from tests/test_export.py) | 4 |
4 files changed, 5 insertions, 4 deletions
diff --git a/tests/test_files/test2.jpg b/tests/test_files/test2.jpg new file mode 120000 index 0000000..0e8c5b6 --- /dev/null +++ b/tests/test_files/test2.jpg @@ -0,0 +1 @@ +test.jpg
\ No newline at end of file diff --git a/tests/test_image.py b/tests/test_image.py index 7dacecb..bcf3b4d 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -14,7 +14,7 @@ class TestImage(unittest.TestCase): def test_get_img_dir(self): """> Validate image directory.""" result = wal.get_image("tests/test_files") - self.assertEqual(result, "tests/test_files/test.jpg") + self.assertEqual(result, "tests/test_files/test2.jpg") if __name__ == "__main__": diff --git a/tests/test_magic.py b/tests/test_magic.py index 852f8b3..a3434df 100755 --- a/tests/test_magic.py +++ b/tests/test_magic.py @@ -10,7 +10,7 @@ class TestGenColors(unittest.TestCase): def test_gen_colors(self): """> Generate a colorscheme.""" result = wal.create_palette("tests/test_files/test.jpg") - self.assertEqual(result[0], "#0F191A") + self.assertEqual(result["colors"]["color0"], "#0F191A") if __name__ == "__main__": diff --git a/tests/test_export.py b/tests/test_template.py index 167d3ed..9040348 100755 --- a/tests/test_export.py +++ b/tests/test_template.py @@ -2,7 +2,7 @@ import unittest import pathlib -from pywal import export +from pywal import template from pywal import util @@ -21,7 +21,7 @@ class TestExportColors(unittest.TestCase): output_dir = pathlib.Path("/tmp") template_dir = pathlib.Path("tests/test_files/templates") - export.export_all_templates(COLORS, template_dir, output_dir) + template.export_all_templates(COLORS, output_dir, template_dir) result = pathlib.Path("/tmp/test_template").is_file() self.assertTrue(result) |
