MCPcopy Index your code
hub / github.com/python/cpython / test_ambiguous_option

Method test_ambiguous_option

Lib/test/test_optparse.py:725–729  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

723 self.assertEqual(vars(defaults), vars(options))
724
725 def test_ambiguous_option(self):
726 self.parser.add_option("--foz", action="store",
727 type="string", dest="foo")
728 self.assertParseFail(["--f=bar"],
729 "ambiguous option: --f (--foo, --foz?)")
730
731
732 def test_short_and_long_option_split(self):

Callers

nothing calls this directly

Calls 2

assertParseFailMethod · 0.80
add_optionMethod · 0.45

Tested by

no test coverage detected