mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-05-29 22:18:49 +02:00
tests: Update tests.
This commit is contained in:
parent
6c08e44ca4
commit
930c3c8e40
21
tests/test_colors.py
Normal file
21
tests/test_colors.py
Normal file
@ -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_image("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_image("tests/test_files")
|
||||||
|
self.assertEqual(result, "tests/test_files/test.jpg")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
unittest.main()
|
@ -7,16 +7,6 @@ from pywal import gen_colors
|
|||||||
class TestGenColors(unittest.TestCase):
|
class TestGenColors(unittest.TestCase):
|
||||||
"""Test the gen_colors functions."""
|
"""Test the gen_colors functions."""
|
||||||
|
|
||||||
def test_get_img(self):
|
|
||||||
"""> Validate image file."""
|
|
||||||
result = gen_colors.get_image("tests/test_files/test.jpg")
|
|
||||||
self.assertEqual(result, "tests/test_files/test.jpg")
|
|
||||||
|
|
||||||
def test_get_img_dir(self):
|
|
||||||
"""> Validate image directory."""
|
|
||||||
result = gen_colors.get_image("tests/test_files")
|
|
||||||
self.assertEqual(result, "tests/test_files/test.jpg")
|
|
||||||
|
|
||||||
def test_gen_colors(self):
|
def test_gen_colors(self):
|
||||||
"""> Generate a colorscheme."""
|
"""> Generate a colorscheme."""
|
||||||
result = gen_colors.gen_colors("tests/test_files/test.jpg")
|
result = gen_colors.gen_colors("tests/test_files/test.jpg")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user