MCPcopy
hub / github.com/docopt/docopt / test_count_multiple_flags

Function test_count_multiple_flags

test_docopt.py:452–461  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

450
451
452def test_count_multiple_flags():
453 assert docopt('usage: prog [-v]', '-v') == {'-v': True}
454 assert docopt('usage: prog [-vv]', '') == {'-v': 0}
455 assert docopt('usage: prog [-vv]', '-v') == {'-v': 1}
456 assert docopt('usage: prog [-vv]', '-vv') == {'-v': 2}
457 with raises(DocoptExit):
458 docopt('usage: prog [-vv]', '-vvv')
459 assert docopt('usage: prog [-v | -vv | -vvv]', '-vvv') == {'-v': 3}
460 assert docopt('usage: prog -v...', '-vvvvvv') == {'-v': 6}
461 assert docopt('usage: prog [--ver --ver]', '--ver --ver') == {'--ver': 2}
462
463
464def test_count_multiple_commands():

Callers

nothing calls this directly

Calls 1

docoptFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…