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

Method autocreated_shortflags_dont_collide

tests/task.py:336–349  ·  view source on GitHub ↗

auto-created short flags don't collide

(self)

Source from the content-addressed store, hash-verified

334 assert "arg" in args
335
336 def autocreated_shortflags_dont_collide(self):
337 "auto-created short flags don't collide"
338
339 @task
340 def mytask(c, arg1, arg2, barg):
341 pass
342
343 args = self._task_to_dict(mytask)
344 assert "a" in args
345 assert args["a"] is args["arg1"]
346 assert "r" in args
347 assert args["r"] is args["arg2"]
348 assert "b" in args
349 assert args["b"] is args["barg"]
350
351 def early_auto_shortflags_shouldnt_lock_out_real_shortflags(self):
352 # I.e. "task --foo -f" => --foo should NOT get to pick '-f' for its

Callers

nothing calls this directly

Calls 1

_task_to_dictMethod · 0.95

Tested by

no test coverage detected