summaryrefslogtreecommitdiff
path: root/tests/test_util.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_util.py')
-rwxr-xr-xtests/test_util.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_util.py b/tests/test_util.py
index 841c242..66a6b7e 100755
--- a/tests/test_util.py
+++ b/tests/test_util.py
@@ -1,5 +1,6 @@
"""Test util functions."""
import unittest
+import os
import pathlib
from pywal import util
@@ -58,6 +59,7 @@ class TestUtil(unittest.TestCase):
util.create_dir(tmp_dir)
result = tmp_dir.is_dir()
self.assertTrue(result)
+ os.rmdir(tmp_dir)
def test_hex_to_rgb_black(self):
"""> Convert #000000 to RGB."""
@@ -79,6 +81,14 @@ class TestUtil(unittest.TestCase):
result = util.hex_to_xrgba("#98AEC2")
self.assertEqual(result, "98/ae/c2/ff")
+ def test_disown(self):
+ """> Test disown command."""
+ test_file = pathlib.Path("/tmp/wal-test-disown")
+ util.disown("touch", test_file)
+ result = test_file.is_file()
+ self.assertTrue(result)
+ os.remove(test_file)
+
if __name__ == "__main__":
unittest.main()