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

Method test_alias_invocation

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

Source from the content-addressed store, hash-verified

3014 '''))
3015
3016 def test_alias_invocation(self):
3017 parser = self._get_parser(aliases=True)
3018 self.assertEqual(
3019 parser.parse_known_args('0.5 1alias1 b'.split()),
3020 (NS(foo=False, bar=0.5, w=None, x='b'), []),
3021 )
3022 self.assertEqual(
3023 parser.parse_known_args('0.5 1alias2 b'.split()),
3024 (NS(foo=False, bar=0.5, w=None, x='b'), []),
3025 )
3026
3027 def test_error_alias_invocation(self):
3028 parser = self._get_parser(aliases=True)

Callers

nothing calls this directly

Calls 5

_get_parserMethod · 0.95
parse_known_argsMethod · 0.80
NSClass · 0.70
assertEqualMethod · 0.45
splitMethod · 0.45

Tested by

no test coverage detected