pywal/tests/test_gen_colors.py

23 lines
594 B
Python
Raw Normal View History

2017-06-27 09:30:31 +02:00
"""Test gen functions."""
import unittest
from pywal import gen_colors
class TestGenColors(unittest.TestCase):
"""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")
2017-06-27 09:30:31 +02:00
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")
2017-06-27 09:30:31 +02:00
if __name__ == "__main__":
unittest.main()