# HG changeset patch # User John Mulligan # Date 1257119464 18000 # Sun Nov 01 18:51:04 2009 -0500 # Node ID 436cc8e42198e0267916079c3f344001605a6893 # Parent 639b5a7f1ff64826da4b0f6be1ddd1ceeead2d53 test commander passes thru deeper TypeErrors correctly diff --git a/test/test_cli_commands.py b/test/test_cli_commands.py --- a/test/test_cli_commands.py +++ b/test/test_cli_commands.py @@ -24,7 +24,9 @@ def cmd3(**opts): - return 3 + def xxx(): + return 3 + return xxx(3) CMDTABLE_A = [ @@ -242,6 +244,10 @@ except: caught = True self.assertTrue(caught) + + def test_main_dispatch_raises(self): + self.assertRaises(TypeError, + commander.main, GOPT_A, CMDTABLE_A, 'baz'.split())