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

Class TestOptionalsSingleDashLong

Lib/test/test_argparse.py:364–375  ·  view source on GitHub ↗

Test an Optional with a multi-character single-dash option string

Source from the content-addressed store, hash-verified

362
363
364class TestOptionalsSingleDashLong(ParserTestCase):
365 """Test an Optional with a multi-character single-dash option string"""
366
367 argument_signatures = [Sig('-foo')]
368 failures = ['-foo', 'a', '--foo', '-foo --foo', '-foo -y', '-fooa']
369 successes = [
370 ('', NS(foo=None)),
371 ('-foo a', NS(foo='a')),
372 ('-foo -1', NS(foo='-1')),
373 ('-fo a', NS(foo='a')),
374 ('-f a', NS(foo='a')),
375 ]
376
377
378class TestOptionalsSingleDashSubsetAmbiguous(ParserTestCase):

Callers

nothing calls this directly

Calls 2

SigClass · 0.85
NSClass · 0.70

Tested by

no test coverage detected