summaryrefslogtreecommitdiff
path: root/tests/test_util.py
diff options
context:
space:
mode:
authorDylan Araps <dylanaraps@users.noreply.github.com>2017-08-12 18:42:27 +1000
committerGitHub <noreply@github.com>2017-08-12 18:42:27 +1000
commit8be48c07fff889ed085744cc0cf585b6d0b71a89 (patch)
tree839edfa96574721cc6fc82ef18059d75ebef792e /tests/test_util.py
parentf14aaf5a4fd1847a5316f9c41965daebc23db818 (diff)
parentc743cab4f0b74e928496c2a5052906da52acc8f7 (diff)
Merge pull request #79 from dylanaraps/35
general: Add support for Python 3.5
Diffstat (limited to 'tests/test_util.py')
-rwxr-xr-xtests/test_util.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/tests/test_util.py b/tests/test_util.py
index bc551ef..79b6b96 100755
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -1,7 +1,6 @@
"""Test util functions."""
import unittest
import os
-import pathlib
from pywal import util
@@ -35,24 +34,23 @@ class TestUtil(unittest.TestCase):
def test_save_file(self):
"""> Save colors to a file."""
- tmp_file = pathlib.Path("/tmp/test_file")
+ tmp_file = "/tmp/test_file"
util.save_file("Hello, world", tmp_file)
- result = tmp_file.is_file()
+ result = os.path.isfile(tmp_file)
self.assertTrue(result)
def test_save_file_json(self):
"""> Save colors to a file."""
- tmp_file = pathlib.Path("/tmp/test_file.json")
+ tmp_file = "/tmp/test_file.json"
util.save_file_json(COLORS, tmp_file)
- result = tmp_file.is_file()
+ result = os.path.isfile(tmp_file)
self.assertTrue(result)
def test_create_dir(self):
"""> Create a directory."""
- tmp_dir = pathlib.Path("/tmp/test_dir")
+ tmp_dir = "/tmp/test_dir"
util.create_dir(tmp_dir)
- result = tmp_dir.is_dir()
- self.assertTrue(result)
+ self.assertTrue(os.path.isdir(tmp_dir))
os.rmdir(tmp_dir)
def test_hex_to_rgb_black(self):