diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-07-23 23:08:36 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-07-23 23:08:36 +1000 |
| commit | 9b695da635966cd22126193f6d0156780a7c0b80 (patch) | |
| tree | 8d1ebafc1754ac0ccf0c5525caba736f85a07d31 /tests | |
| parent | 1570dd003d49211cdaa6ed47024c1c0774b93505 (diff) | |
tests: process args
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_main.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/test_main.py b/tests/test_main.py index 59e955c..6054769 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -20,17 +20,20 @@ class TestMain(unittest.TestCase): def test_version(self): """> Test arg parsing (-v)""" - args = __main__.get_args(["-v"]) - self.assertTrue(args.v) + with self.assertRaises(SystemExit): + args = __main__.get_args(["-v"]) + __main__.process_args(args) def test_quiet(self): """> Test arg parsing (-q)""" args = __main__.get_args(["-q"]) + __main__.process_args(args) self.assertTrue(args.q) def test_ext_script(self): """> Test arg parsing (-o)""" args = __main__.get_args(["-o", "true"]) + __main__.process_args(args) self.assertTrue(args.o) |
