Commits

Andy Mikhailenko  committed 0a12b6c

Add test re issue #12.

  • Participants
  • Parent commits d9b6024

Comments (0)

Files changed (1)

         self.assert_cmd_returns('command-deco-issue12 --fox 3', 'foo 1, fox 3\n')
         self.assert_cmd_fails('command-deco-issue12 -f 3', 'unrecognized')
 
+    @unittest.expectedFailure
+    def test_regression_issue12_help_flag(self):
+        """Issue #12: if an argument starts with "h", e.g. "--host",
+        ArgumentError is raised because "--help" is always added by argh
+        without decorators.
+        """
+        @command
+        def ddos(host='localhost'):
+            print 'so be it!'
+
+        self.parser = DebugArghParser('PROG')
+        self.parser.set_default_command(ddos)
+
     def test_declared_vs_inferred_merging(self):
         """ @arg merges into function signature if @command is applied.
         """