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

Method test_add_choice_option

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

Source from the content-addressed store, hash-verified

829 "(choose from 'one', 'two', 'three')")
830
831 def test_add_choice_option(self):
832 self.parser.add_option("-d", "--default",
833 choices=["four", "five", "six"])
834 opt = self.parser.get_option("-d")
835 self.assertEqual(opt.type, "choice")
836 self.assertEqual(opt.action, "store")
837
838class TestCount(BaseTest):
839 def setUp(self):

Callers

nothing calls this directly

Calls 3

add_optionMethod · 0.45
get_optionMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected