diff options
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/test_export.py | 2 | ||||
| -rw-r--r-- | tests/test_main.py | 4 | ||||
| -rwxr-xr-x | tests/test_sequences.py | 3 | ||||
| -rwxr-xr-x | tests/test_util.py | 5 |
4 files changed, 8 insertions, 6 deletions
diff --git a/tests/test_export.py b/tests/test_export.py index 2323c69..e2838fe 100755 --- a/tests/test_export.py +++ b/tests/test_export.py @@ -43,7 +43,7 @@ class TestExportColors(unittest.TestCase): def test_invalid_template(self): """> Test template validation.""" - error_msg = "[!] warning: template 'dummy' doesn't exist." + error_msg = "warning: template 'dummy' doesn't exist." # Since this function prints a message on fail we redirect # it's output so that we can read it. diff --git a/tests/test_main.py b/tests/test_main.py index 9262c8f..7f1a1bb 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -2,6 +2,8 @@ import unittest from unittest.mock import MagicMock +import os + from pywal import __main__ from pywal import reload from pywal.settings import CACHE_DIR @@ -14,7 +16,7 @@ class TestMain(unittest.TestCase): """> Test arg parsing (-c)""" args = __main__.get_args(["-c"]) __main__.process_args(args) - self.assertFalse((CACHE_DIR / "schemes").is_dir()) + self.assertFalse(os.path.isdir(str(CACHE_DIR / "schemes"))) def test_args_e(self): """> Test arg parsing (-e)""" diff --git a/tests/test_sequences.py b/tests/test_sequences.py index 66f4084..392abc7 100755 --- a/tests/test_sequences.py +++ b/tests/test_sequences.py @@ -32,7 +32,8 @@ class Testsequences(unittest.TestCase): def test_set_iterm_tab_color(self): """> Create iterm tab color sequences""" result = sequences.set_iterm_tab_color(COLORS["special"]["background"]) - self.assertEqual(len(result), 3) + print(result) + self.assertEqual(len(result), 104) if __name__ == "__main__": diff --git a/tests/test_util.py b/tests/test_util.py index bc551ef..aae0356 100755 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -49,10 +49,9 @@ class TestUtil(unittest.TestCase): 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): |
