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

Class TestOptionalsDoubleDashPartialMatch

Lib/test/test_argparse.py:444–459  ·  view source on GitHub ↗

Tests partial matching with a double-dash option string

Source from the content-addressed store, hash-verified

442
443
444class TestOptionalsDoubleDashPartialMatch(ParserTestCase):
445 """Tests partial matching with a double-dash option string"""
446
447 argument_signatures = [
448 Sig('--badger', action='store_true'),
449 Sig('--bat'),
450 ]
451 failures = ['--bar', '--b', '--ba', '--b=2', '--ba=4', '--badge 5']
452 successes = [
453 ('', NS(badger=False, bat=None)),
454 ('--bat X', NS(badger=False, bat='X')),
455 ('--bad', NS(badger=True, bat=None)),
456 ('--badg', NS(badger=True, bat=None)),
457 ('--badge', NS(badger=True, bat=None)),
458 ('--badger', NS(badger=True, bat=None)),
459 ]
460
461
462class TestOptionalsDoubleDashPrefixMatch(ParserTestCase):

Callers

nothing calls this directly

Calls 2

SigClass · 0.85
NSClass · 0.70

Tested by

no test coverage detected