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

Method test_argument

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

Source from the content-addressed store, hash-verified

6082 self.assertStringEqual(option, string)
6083
6084 def test_argument(self):
6085 argument = argparse.Action(
6086 option_strings=[],
6087 dest='x',
6088 type=float,
6089 nargs='?',
6090 default=2.5,
6091 choices=[0.5, 1.5, 2.5],
6092 required=True,
6093 help='H HH H',
6094 metavar='MV MV MV')
6095 string = (
6096 "Action(option_strings=[], dest='x', nargs='?', "
6097 "const=None, default=2.5, type=%r, choices=[0.5, 1.5, 2.5], "
6098 "required=True, help='H HH H', metavar='MV MV MV', "
6099 "deprecated=False)" % float)
6100 self.assertStringEqual(argument, string)
6101
6102 def test_namespace(self):
6103 ns = argparse.Namespace(foo=42, bar='spam')

Callers

nothing calls this directly

Calls 1

assertStringEqualMethod · 0.95

Tested by

no test coverage detected