MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_group_first

Method test_group_first

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

Source from the content-addressed store, hash-verified

2959 self.assertEqual(expected, result)
2960
2961 def test_group_first(self):
2962 parser = ErrorRaisingArgumentParser()
2963 group = parser.add_argument_group('xxx')
2964 group.add_argument('foo')
2965 parser.add_argument('bar')
2966 parser.add_argument('baz')
2967 expected = NS(foo='1', bar='2', baz='3')
2968 result = parser.parse_args('1 2 3'.split())
2969 self.assertEqual(expected, result)
2970
2971 def test_interleaved_groups(self):
2972 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