diff --git a/tests/test.jpg b/tests/test.jpg new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_gen_colors.py b/tests/test_gen_colors.py new file mode 100755 index 0000000..e9fa5e2 --- /dev/null +++ b/tests/test_gen_colors.py @@ -0,0 +1,27 @@ +"""Test gen functions.""" +import unittest + +from pywal import gen_colors +from pywal import util + + +# Import colors. +COLORS = util.read_file("tests/test_file") + + +class TestGenColors(unittest.TestCase): + """Test the gen_colors functions.""" + + def test_get_img(self): + """> Validate image file.""" + result = gen_colors.get_image("tests/test.jpg") + self.assertEqual(result, "tests/test.jpg") + + def test_get_img_dir(self): + """> Validate image directory.""" + result = gen_colors.get_image("tests") + self.assertEqual(result, "tests/test.jpg") + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_set_colors.py b/tests/test_set_colors.py index 5ff6b5c..3d3d800 100755 --- a/tests/test_set_colors.py +++ b/tests/test_set_colors.py @@ -10,7 +10,7 @@ COLORS = util.read_file("tests/test_file") class TestSetColors(unittest.TestCase): - """Test the format_colors functions.""" + """Test the set_colors functions.""" def test_set_special(self): """> Create special escape sequence."""