diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-22 22:26:49 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-22 22:26:49 +1000 |
| commit | de47c1beaaa77ee6f50235daba735ccc98ad608c (patch) | |
| tree | 03fca45aead0204d0b8619d775077f1046230ba0 /tests | |
| parent | a4ea6a4f7addc3ada3c466a763331d793190a342 (diff) | |
api: Remove wal.py
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/test_colors.py (renamed from tests/test_magic.py) | 4 | ||||
| -rw-r--r-- | tests/test_image.py | 10 | ||||
| -rwxr-xr-x | tests/test_template.py | 4 |
3 files changed, 7 insertions, 11 deletions
diff --git a/tests/test_magic.py b/tests/test_colors.py index a3434df..e83c54d 100755 --- a/tests/test_magic.py +++ b/tests/test_colors.py @@ -1,7 +1,7 @@ """Test imagemagick functions.""" import unittest -from pywal import wal +from pywal import colors class TestGenColors(unittest.TestCase): @@ -9,7 +9,7 @@ class TestGenColors(unittest.TestCase): def test_gen_colors(self): """> Generate a colorscheme.""" - result = wal.create_palette("tests/test_files/test.jpg") + result = colors.get("tests/test_files/test.jpg") self.assertEqual(result["colors"]["color0"], "#0F191A") diff --git a/tests/test_image.py b/tests/test_image.py index 95a357e..da557a7 100644 --- a/tests/test_image.py +++ b/tests/test_image.py @@ -1,23 +1,19 @@ """Test image functions.""" -import pathlib import unittest -from pywal import wal - - -CACHE_DIR = pathlib.Path("/tmp/wal") +from pywal import image class TestImage(unittest.TestCase): """Test image functions.""" def test_get_img(self): """> Validate image file.""" - result = wal.get_image("tests/test_files/test.jpg", CACHE_DIR) + 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 = wal.get_image("tests/test_files", CACHE_DIR) + result = image.get("tests/test_files") self.assertEqual(result, "tests/test_files/test2.jpg") diff --git a/tests/test_template.py b/tests/test_template.py index 992c9c0..ef71b8b 100755 --- a/tests/test_template.py +++ b/tests/test_template.py @@ -2,7 +2,7 @@ import unittest import pathlib -from pywal import wal +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") - wal.export_all_templates(COLORS, output_dir, template_dir) + template.export_all(COLORS, output_dir, template_dir) result = pathlib.Path("/tmp/test_template").is_file() self.assertTrue(result) |
