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

Class TestOptionalsDoubleDash

Lib/test/test_argparse.py:430–441  ·  view source on GitHub ↗

Test an Optional with a double-dash option string

Source from the content-addressed store, hash-verified

428
429
430class TestOptionalsDoubleDash(ParserTestCase):
431 """Test an Optional with a double-dash option string"""
432
433 argument_signatures = [Sig('--foo')]
434 failures = ['--foo', '-f', '-f a', 'a', '--foo -x', '--foo --bar']
435 successes = [
436 ('', NS(foo=None)),
437 ('--foo a', NS(foo='a')),
438 ('--foo=a', NS(foo='a')),
439 ('--foo -2.5', NS(foo='-2.5')),
440 ('--foo=-2.5', NS(foo='-2.5')),
441 ]
442
443
444class TestOptionalsDoubleDashPartialMatch(ParserTestCase):

Callers

nothing calls this directly

Calls 2

SigClass · 0.85
NSClass · 0.70

Tested by

no test coverage detected