diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-06-30 10:10:07 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-06-30 10:10:07 +1000 |
| commit | 930c3c8e40ca5c563d0414e5057b23ad27aa7cf3 (patch) | |
| tree | 9d5e58b53cccd15c51fb868179c092702c704738 | |
| parent | 6c08e44ca416bfa7637505d5c58b7e6e980a20e6 (diff) | |
tests: Update tests.
| -rw-r--r-- | tests/test_colors.py | 21 | ||||
| -rwxr-xr-x | tests/test_gen_colors.py | 10 |
2 files changed, 21 insertions, 10 deletions
diff --git a/tests/test_colors.py b/tests/test_colors.py new file mode 100644 index 0000000..077600e --- /dev/null +++ b/tests/test_colors.py @@ -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() diff --git a/tests/test_gen_colors.py b/tests/test_gen_colors.py index 18ba821..5b407af 100755 --- a/tests/test_gen_colors.py +++ b/tests/test_gen_colors.py @@ -7,16 +7,6 @@ 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") - - 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): """> Generate a colorscheme.""" result = gen_colors.gen_colors("tests/test_files/test.jpg") |
