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

Method test_group_first

Lib/test/test_argparse.py:3072–3080  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3070 self.assertEqual(expected, result)
3071
3072 def test_group_first(self):
3073 parser = ErrorRaisingArgumentParser()
3074 group = parser.add_argument_group('xxx')
3075 group.add_argument('foo')
3076 parser.add_argument('bar')
3077 parser.add_argument('baz')
3078 expected = NS(foo='1', bar='2', baz='3')
3079 result = parser.parse_args('1 2 3'.split())
3080 self.assertEqual(expected, result)
3081
3082 def test_interleaved_groups(self):
3083 parser = ErrorRaisingArgumentParser()

Callers

nothing calls this directly

Calls 7

parse_argsMethod · 0.95
NSClass · 0.70
add_argument_groupMethod · 0.45
add_argumentMethod · 0.45
splitMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected