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

Class TestOptionalsSingleDash

Lib/test/test_argparse.py:324–335  ·  view source on GitHub ↗

Test an Optional with a single-dash option string

Source from the content-addressed store, hash-verified

322# ===============
323
324class TestOptionalsSingleDash(ParserTestCase):
325 """Test an Optional with a single-dash option string"""
326
327 argument_signatures = [Sig('-x')]
328 failures = ['-x', 'a', '--foo', '-x --foo', '-x -y']
329 successes = [
330 ('', NS(x=None)),
331 ('-x a', NS(x='a')),
332 ('-xa', NS(x='a')),
333 ('-x -1', NS(x='-1')),
334 ('-x-1', NS(x='-1')),
335 ]
336
337
338class TestOptionalsSingleDashCombined(ParserTestCase):

Callers

nothing calls this directly

Calls 2

SigClass · 0.85
NSClass · 0.70

Tested by

no test coverage detected