MCPcopy Create free account
hub / github.com/pyinvoke/invoke / _assert_order

Method _assert_order

tests/parser_context.py:244–247  ·  view source on GitHub ↗
(self, name_tuples, expected_flag_order)

Source from the content-addressed store, hash-verified

242 assert c.help_tuples() == expected
243
244 def _assert_order(self, name_tuples, expected_flag_order):
245 c = Context(args=[Argument(names=x) for x in name_tuples])
246 expected = [c.help_for(x) for x in expected_flag_order]
247 assert c.help_tuples() == expected
248
249 def sorts_alphabetically_by_shortflag_first(self):
250 # Where shortflags exist, they take precedence

Calls 4

ArgumentClass · 0.90
ContextClass · 0.85
help_forMethod · 0.80
help_tuplesMethod · 0.80

Tested by

no test coverage detected