MCPcopy Index your code
hub / github.com/pyinvoke/invoke / setup_method

Method setup_method

tests/task.py:262–269  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

260
261 class get_arguments:
262 def setup_method(self):
263 @task(positional=["arg_3", "arg1"], optional=["arg1"])
264 def mytask(c, arg1, arg2=False, arg_3=5):
265 pass
266
267 self.task = mytask
268 self.args = self.task.get_arguments()
269 self.argdict = self._arglist_to_dict(self.args)
270
271 def _arglist_to_dict(self, arglist):
272 # This kinda duplicates Context.add_arg(x) for x in arglist :(

Callers

nothing calls this directly

Calls 2

_arglist_to_dictMethod · 0.95
get_argumentsMethod · 0.80

Tested by

no test coverage detected