pywal/tests/test_image.py

22 lines
561 B
Python
Raw Normal View History

2017-06-30 02:10:07 +02:00
"""Test image functions."""
import unittest
2017-07-20 15:39:19 +02:00
from pywal import wal
2017-06-30 02:10:07 +02:00
class TestImage(unittest.TestCase):
"""Test image functions."""
def test_get_img(self):
"""> Validate image file."""
2017-07-20 15:39:19 +02:00
result = wal.get_image("tests/test_files/test.jpg")
2017-06-30 02:10:07 +02:00
self.assertEqual(result, "tests/test_files/test.jpg")
def test_get_img_dir(self):
"""> Validate image directory."""
2017-07-20 15:39:19 +02:00
result = wal.get_image("tests/test_files")
2017-06-30 02:10:07 +02:00
self.assertEqual(result, "tests/test_files/test.jpg")
if __name__ == "__main__":
unittest.main()