diff options
Diffstat (limited to 'tests/test_export_colors.py')
| -rwxr-xr-x | tests/test_export_colors.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/test_export_colors.py b/tests/test_export_colors.py new file mode 100755 index 0000000..ce6fe1e --- /dev/null +++ b/tests/test_export_colors.py @@ -0,0 +1,21 @@ +"""Test util functions.""" +import unittest +import pathlib +from pywal import export_colors +from pywal import util + + +class TestExportColors(unittest.TestCase): + """Test the export_colors functions.""" + + def test_save_colors(self): + """> Export colors to a file.""" + tmp_file = pathlib.Path("/tmp/test_file") + colors = util.read_file("tests/test_file") + export_colors.save_colors(colors, tmp_file, "plain colors") + result = tmp_file.is_file() + self.assertTrue(result) + + +if __name__ == "__main__": + unittest.main() |
