Commits

John Mulligan committed 436cc8e

test commander passes thru deeper TypeErrors correctly

  • Participants
  • Parent commits 639b5a7

Comments (0)

Files changed (1)

File test/test_cli_commands.py

 
 
 def cmd3(**opts):
-    return 3
+    def xxx():
+        return 3
+    return xxx(3)
 
 
 CMDTABLE_A = [
         except:
             caught = True
         self.assertTrue(caught)
+
+    def test_main_dispatch_raises(self):
+        self.assertRaises(TypeError,
+            commander.main, GOPT_A, CMDTABLE_A, 'baz'.split())