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

Method test_optional

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

Source from the content-addressed store, hash-verified

5946 self.assertEqual(func(obj), result_string)
5947
5948 def test_optional(self):
5949 option = argparse.Action(
5950 option_strings=['--foo', '-a', '-b'],
5951 dest='b',
5952 type='int',
5953 nargs='+',
5954 default=42,
5955 choices=[1, 2, 3],
5956 required=False,
5957 help='HELP',
5958 metavar='METAVAR')
5959 string = (
5960 "Action(option_strings=['--foo', '-a', '-b'], dest='b', "
5961 "nargs='+', const=None, default=42, type='int', "
5962 "choices=[1, 2, 3], required=False, help='HELP', "
5963 "metavar='METAVAR', deprecated=False)")
5964 self.assertStringEqual(option, string)
5965
5966 def test_argument(self):
5967 argument = argparse.Action(

Callers

nothing calls this directly

Calls 1

assertStringEqualMethod · 0.95

Tested by

no test coverage detected