From 84b134a50da5995b41ddaff42e2b7a92319236d8 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sun, 23 Jul 2017 23:12:57 +1000 Subject: tests: test main() --- tests/test_main.py | 7 ++++++- tests/test_util.py | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/test_main.py b/tests/test_main.py index 6054769..b3ea4e3 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -6,8 +6,13 @@ from pywal import __main__ class TestMain(unittest.TestCase): """Test the gen_colors functions.""" + def test_main(self): + """> Test main function.""" + with self.assertRaises(SystemExit): + __main__.main() + def test_no_args(self): - """> Generate a colorscheme and fail.""" + """> Test no args.""" with self.assertRaises(SystemExit): args = __main__.get_args([""]) __main__.process_args(args) diff --git a/tests/test_util.py b/tests/test_util.py index 3a3ecdb..051c365 100755 --- a/tests/test_util.py +++ b/tests/test_util.py @@ -57,7 +57,7 @@ class TestUtil(unittest.TestCase): self.assertTrue(result) def test_create_dir(self): - """> Create a directoru.""" + """> Create a directory.""" tmp_dir = pathlib.Path("/tmp/test_dir") util.create_dir(tmp_dir) result = tmp_dir.is_dir() -- cgit v1.2.3