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

Method test_interleaved_groups

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

Source from the content-addressed store, hash-verified

3080 self.assertEqual(expected, result)
3081
3082 def test_interleaved_groups(self):
3083 parser = ErrorRaisingArgumentParser()
3084 group = parser.add_argument_group('xxx')
3085 parser.add_argument('foo')
3086 group.add_argument('bar')
3087 parser.add_argument('baz')
3088 group = parser.add_argument_group('yyy')
3089 group.add_argument('frell')
3090 expected = NS(foo='1', bar='2', baz='3', frell='4')
3091 result = parser.parse_args('1 2 3 4'.split())
3092 self.assertEqual(expected, result)
3093
3094class TestGroupConstructor(TestCase):
3095 def test_group_prefix_chars(self):

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