diff --git a/rattail/tests/commands/test_core.py b/rattail/tests/commands/test_core.py index 549b0508221d4d238092f849d2cc340c09f4f195..d982de2b9f3e2c6a1476c4d512914dbefc922a05 100644 --- a/rattail/tests/commands/test_core.py +++ b/rattail/tests/commands/test_core.py @@ -78,7 +78,7 @@ class TestCommand(TestCase): def test_run_with_no_args_prints_help(self): command = core.Command() with patch.object(command, 'print_help') as print_help: - command.run() + self.assertRaises(SystemExit, command.run) print_help.assert_called_once_with() def test_run_with_single_help_arg_prints_help(self): @@ -102,7 +102,7 @@ class TestCommand(TestCase): def test_run_with_unknown_subcommand_arg_prints_help(self): command = core.Command() with patch.object(command, 'print_help') as print_help: - command.run('invalid-command-name') + self.assertRaises(SystemExit, command.run, 'invalid-command-name') print_help.assert_called_once_with() def test_stdout_may_be_redirected(self):