MCPcopy
hub / github.com/docopt/docopt / test_argument_match

Function test_argument_match

test_docopt.py:156–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154
155
156def test_argument_match():
157 assert Argument('N').match([Argument(None, 9)]) == \
158 (True, [], [Argument('N', 9)])
159 assert Argument('N').match([Option('-x')]) == (False, [Option('-x')], [])
160 assert Argument('N').match([Option('-x'),
161 Option('-a'),
162 Argument(None, 5)]) == \
163 (True, [Option('-x'), Option('-a')], [Argument('N', 5)])
164 assert Argument('N').match([Argument(None, 9), Argument(None, 0)]) == \
165 (True, [Argument(None, 0)], [Argument('N', 9)])
166
167
168def test_command_match():

Callers

nothing calls this directly

Calls 3

ArgumentClass · 0.90
OptionClass · 0.90
matchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…