mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-25 09:23:08 +01:00
tests: test main()
This commit is contained in:
parent
9b695da635
commit
84b134a50d
@ -6,8 +6,13 @@ from pywal import __main__
|
|||||||
class TestMain(unittest.TestCase):
|
class TestMain(unittest.TestCase):
|
||||||
"""Test the gen_colors functions."""
|
"""Test the gen_colors functions."""
|
||||||
|
|
||||||
|
def test_main(self):
|
||||||
|
"""> Test main function."""
|
||||||
|
with self.assertRaises(SystemExit):
|
||||||
|
__main__.main()
|
||||||
|
|
||||||
def test_no_args(self):
|
def test_no_args(self):
|
||||||
"""> Generate a colorscheme and fail."""
|
"""> Test no args."""
|
||||||
with self.assertRaises(SystemExit):
|
with self.assertRaises(SystemExit):
|
||||||
args = __main__.get_args([""])
|
args = __main__.get_args([""])
|
||||||
__main__.process_args(args)
|
__main__.process_args(args)
|
||||||
|
@ -57,7 +57,7 @@ class TestUtil(unittest.TestCase):
|
|||||||
self.assertTrue(result)
|
self.assertTrue(result)
|
||||||
|
|
||||||
def test_create_dir(self):
|
def test_create_dir(self):
|
||||||
"""> Create a directoru."""
|
"""> Create a directory."""
|
||||||
tmp_dir = pathlib.Path("/tmp/test_dir")
|
tmp_dir = pathlib.Path("/tmp/test_dir")
|
||||||
util.create_dir(tmp_dir)
|
util.create_dir(tmp_dir)
|
||||||
result = tmp_dir.is_dir()
|
result = tmp_dir.is_dir()
|
||||||
|
Loading…
Reference in New Issue
Block a user