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."""
|
2017-06-27 09:34:34 +02:00
|
|
|
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."""
|
2017-06-27 09:34:34 +02:00
|
|
|
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()
|