diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-23 20:13:43 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-23 20:13:43 +1000 |
| commit | 86ed02bfc59023fa38c8d1780234f3d2f75a085d (patch) | |
| tree | c5dfc8f00160737343ff1e1e9e2661de7944e8c6 /tests | |
| parent | f13a0c28fd27dc0238103a0a750b8f88c5eac804 (diff) | |
tests: Added a test for disown()
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/test_util.py | 10 |
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() |
