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

Method setUp

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

Source from the content-addressed store, hash-verified

814
815class TestChoice(BaseTest):
816 def setUp(self):
817 self.parser = InterceptingOptionParser(usage=SUPPRESS_USAGE)
818 self.parser.add_option("-c", action="store", type="choice",
819 dest="choice", choices=["one", "two", "three"])
820
821 def test_valid_choice(self):
822 self.assertParseOK(["-c", "one", "xyz"],

Callers

nothing calls this directly

Calls 2

add_optionMethod · 0.45

Tested by

no test coverage detected