summaryrefslogtreecommitdiff
path: root/tests/test_export_colors.py
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2017-06-27 17:02:42 +1000
committerDylan Araps <dylan.araps@gmail.com>2017-06-27 17:02:42 +1000
commit10c7099a27542d58a66e4fb8d740ec62db2904bf (patch)
tree8b31932c023bed96f841a94d015e645f303922f1 /tests/test_export_colors.py
parentce2d85d5d6ef321b5950d9728ee7204e5724a945 (diff)
tests: Fix comments
Diffstat (limited to 'tests/test_export_colors.py')
-rwxr-xr-xtests/test_export_colors.py21
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()