summaryrefslogtreecommitdiff
path: root/tests/test_format_colors.py
diff options
context:
space:
mode:
authorDylan Araps <dylanaraps@users.noreply.github.com>2017-06-29 23:07:13 +1000
committerGitHub <noreply@github.com>2017-06-29 23:07:13 +1000
commitc7cd458bfd9fd5767dafb7948dd22ef6774ac9c9 (patch)
tree0fd07c4096ee4ca495faecdb2201f76e515da787 /tests/test_format_colors.py
parent3283d38e07d4b20ad3a0646d28284fe205fcdc57 (diff)
parent08f396c653e6b3fb738f39d13a9ca5eea0d61f28 (diff)
Merge pull request #18 from dylanaraps/template
colors: Use template files and un-hard-code export formats.
Diffstat (limited to 'tests/test_format_colors.py')
-rwxr-xr-xtests/test_format_colors.py47
1 files changed, 0 insertions, 47 deletions
diff --git a/tests/test_format_colors.py b/tests/test_format_colors.py
deleted file mode 100755
index 732f67b..0000000
--- a/tests/test_format_colors.py
+++ /dev/null
@@ -1,47 +0,0 @@
-"""Test format functions."""
-import unittest
-
-from pywal import format_colors
-from pywal import util
-
-
-# Import colors.
-COLORS = util.read_file_json("tests/test_files/test_file.json")
-
-
-class TestFormatColors(unittest.TestCase):
- """Test the format_colors functions."""
-
- def test_plain(self):
- """> Convert colors to plain."""
- result = format_colors.plain(COLORS)
- self.assertEqual(result[0], "#3A5130\n")
-
- def test_shell(self):
- """> Convert colors to shell variables."""
- result = format_colors.shell(COLORS)
- self.assertEqual(result[0], "color0='#3A5130'\n")
-
- def test_css(self):
- """> Convert colors to css variables."""
- result = format_colors.css(COLORS)
- self.assertEqual(result[1], "\t--color0: #3A5130;\n")
-
- def test_scss(self):
- """> Convert colors to scss variables."""
- result = format_colors.scss(COLORS)
- self.assertEqual(result[0], "$color0: #3A5130;\n")
-
- def test_putty(self):
- """> Convert colors to putty theme."""
- result = format_colors.putty(COLORS)
- self.assertEqual(result[2], "\"colour0\"=\"58,81,48\"\n")
-
- def test_xrdb(self):
- """> Convert colors to putty theme."""
- result = format_colors.xrdb(COLORS)
- self.assertEqual(result[6], "*.color0: #3A5130\n*color0: #3A5130\n")
-
-
-if __name__ == "__main__":
- unittest.main()