MCPcopy
hub / github.com/docopt/docopt / test_printable_and_formal_usage

Function test_printable_and_formal_usage

test_docopt.py:67–75  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

65
66
67def test_printable_and_formal_usage():
68 doc = """
69 Usage: prog [-hv] ARG
70 prog N M
71
72 prog is a program."""
73 assert printable_usage(doc) == "Usage: prog [-hv] ARG\n prog N M"
74 assert formal_usage(printable_usage(doc)) == "( [-hv] ARG ) | ( N M )"
75 assert printable_usage('uSaGe: prog ARG\n\t \t\n bla') == "uSaGe: prog ARG"
76
77
78def test_parse_argv():

Callers

nothing calls this directly

Calls 2

printable_usageFunction · 0.90
formal_usageFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…