mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-08-20 10:47:57 +02:00
api: Remove wal.py
This commit is contained in:
@@ -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")
|
||||
|
||||
|
@@ -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")
|
||||
|
||||
|
||||
|
@@ -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)
|
||||
|
Reference in New Issue
Block a user