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

Class TestOptionalsSingleDashSubsetAmbiguous

Lib/test/test_argparse.py:378–391  ·  view source on GitHub ↗

Test Optionals where option strings are subsets of each other

Source from the content-addressed store, hash-verified

376
377
378class TestOptionalsSingleDashSubsetAmbiguous(ParserTestCase):
379 """Test Optionals where option strings are subsets of each other"""
380
381 argument_signatures = [Sig('-f'), Sig('-foobar'), Sig('-foorab')]
382 failures = ['-f', '-foo', '-fo', '-foo b', '-foob', '-fooba', '-foora']
383 successes = [
384 ('', NS(f=None, foobar=None, foorab=None)),
385 ('-f a', NS(f='a', foobar=None, foorab=None)),
386 ('-fa', NS(f='a', foobar=None, foorab=None)),
387 ('-foa', NS(f='oa', foobar=None, foorab=None)),
388 ('-fooa', NS(f='ooa', foobar=None, foorab=None)),
389 ('-foobar a', NS(f=None, foobar='a', foorab=None)),
390 ('-foorab a', NS(f=None, foobar=None, foorab='a')),
391 ]
392
393
394class TestOptionalsSingleDashAmbiguous(ParserTestCase):

Callers

nothing calls this directly

Calls 2

SigClass · 0.85
NSClass · 0.70

Tested by

no test coverage detected