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

Method test_option_group_create_instance

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

Source from the content-addressed store, hash-verified

986 self.parser = OptionParser(usage=SUPPRESS_USAGE)
987
988 def test_option_group_create_instance(self):
989 group = OptionGroup(self.parser, "Spam")
990 self.parser.add_option_group(group)
991 group.add_option("--spam", action="store_true",
992 help="spam spam spam spam")
993 self.assertParseOK(["--spam"], {'spam': 1}, [])
994
995 def test_add_group_no_group(self):
996 self.assertTypeError(self.parser.add_option_group,

Callers

nothing calls this directly

Calls 4

OptionGroupClass · 0.90
add_option_groupMethod · 0.80
assertParseOKMethod · 0.80
add_optionMethod · 0.45

Tested by

no test coverage detected