diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-22 10:01:14 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-22 10:01:14 +1000 |
| commit | c8dd8f4d03fc79b5594e8d873e0aba77e360796a (patch) | |
| tree | 1d208cc23aee244c252b76de2d56ab64e289ee48 /tests/test_export.py | |
| parent | d8d0297d8968380879718758493fd135b5234591 (diff) | |
general: Fixes.
Diffstat (limited to 'tests/test_export.py')
| -rwxr-xr-x | tests/test_export.py | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/tests/test_export.py b/tests/test_export.py deleted file mode 100755 index 167d3ed..0000000 --- a/tests/test_export.py +++ /dev/null @@ -1,36 +0,0 @@ -"""Test export functions.""" -import unittest -import pathlib - -from pywal import export -from pywal import util - - -# Import colors. -COLORS = util.read_file_json("tests/test_files/test_file.json") - - -class TestExportColors(unittest.TestCase): - """Test the export functions.""" - - def test_template(self): - """> Test substitutions in template file.""" - # Merge both dicts so we can access their - # values simpler. - COLORS["colors"].update(COLORS["special"]) - - output_dir = pathlib.Path("/tmp") - template_dir = pathlib.Path("tests/test_files/templates") - export.export_all_templates(COLORS, template_dir, output_dir) - - result = pathlib.Path("/tmp/test_template").is_file() - self.assertTrue(result) - - content = pathlib.Path("/tmp/test_template").read_text() - self.assertEqual(content, '\n'.join(["test1 #1F211E", - "test2 #1F211E", - "test3 31,33,30", ""])) - - -if __name__ == "__main__": - unittest.main() |
