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

Method test_invalid_choice

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

Source from the content-addressed store, hash-verified

824 ["xyz"])
825
826 def test_invalid_choice(self):
827 self.assertParseFail(["-c", "four", "abc"],
828 "option -c: invalid choice: 'four' "
829 "(choose from 'one', 'two', 'three')")
830
831 def test_add_choice_option(self):
832 self.parser.add_option("-d", "--default",

Callers

nothing calls this directly

Calls 1

assertParseFailMethod · 0.80

Tested by

no test coverage detected