test commander passes thru deeper TypeErrors correctly
1 files changed, 7 insertions(+), 1 deletions(-) M test/test_cli_commands.py
M test/test_cli_commands.py +7 -1
@@ 24,7 24,9 @@ def cmd2(**opts): def cmd3(**opts): - return 3 + def xxx(): + return 3 + return xxx(3) CMDTABLE_A = [ @@ 242,6 244,10 @@ class TestCliCommands(unittest.TestCase) except: caught = True self.assertTrue(caught) + + def test_main_dispatch_raises(self): + self.assertRaises(TypeError, + commander.main, GOPT_A, CMDTABLE_A, 'baz'.split())