summaryrefslogtreecommitdiff
path: root/tests/test_export_colors.py
blob: ce6fe1ecc465622c04bf6539c9cdfc0a85c919d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()