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

Method test_group_manipulate

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

Source from the content-addressed store, hash-verified

1007 ValueError, "invalid OptionGroup (wrong parser)")
1008
1009 def test_group_manipulate(self):
1010 group = self.parser.add_option_group("Group 2",
1011 description="Some more options")
1012 group.set_title("Bacon")
1013 group.add_option("--bacon", type="int")
1014 self.assertTrue(self.parser.get_option_group("--bacon"), group)
1015
1016# -- Test extending and parser.parse_args() ----------------------------
1017

Callers

nothing calls this directly

Calls 5

add_option_groupMethod · 0.80
set_titleMethod · 0.80
assertTrueMethod · 0.80
get_option_groupMethod · 0.80
add_optionMethod · 0.45

Tested by

no test coverage detected