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

Method test_multiple_parents_mutex

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

Source from the content-addressed store, hash-verified

3193 NS(a='3', b=None, d='1', w='2', y=None, z='4'))
3194
3195 def test_multiple_parents_mutex(self):
3196 parents = [self.ab_mutex_parent, self.wxyz_parent]
3197 parser = ErrorRaisingArgumentParser(parents=parents)
3198 self.assertEqual(parser.parse_args('-a --w 2 3'.split()),
3199 NS(a=True, b=False, w='2', y=None, z='3'))
3200 self.assertArgumentParserError(
3201 parser.parse_args, '-a --w 2 3 -b'.split())
3202 self.assertArgumentParserError(
3203 parser.parse_args, '-a -b --w 2 3'.split())
3204
3205 def test_conflicting_parents(self):
3206 self.assertRaises(

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected