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

Class TestOptionalsNumeric

Lib/test/test_argparse.py:437–447  ·  view source on GitHub ↗

Test an Optional with a short opt string

Source from the content-addressed store, hash-verified

435
436
437class TestOptionalsNumeric(ParserTestCase):
438 """Test an Optional with a short opt string"""
439
440 argument_signatures = [Sig('-1', dest='one')]
441 failures = ['-1', 'a', '-1 --foo', '-1 -y', '-1 -1', '-1 -2']
442 successes = [
443 ('', NS(one=None)),
444 ('-1 a', NS(one='a')),
445 ('-1a', NS(one='a')),
446 ('-1-2', NS(one='-2')),
447 ]
448
449
450class TestOptionalsDoubleDash(ParserTestCase):

Callers

nothing calls this directly

Calls 2

SigClass · 0.85
NSClass · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…