Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@action_for(context)
def action2():
pass
@action_for(context, provides=["check_output"])
def check_output(expected):
context.output.getvalue().should.equal(expected)
@action_for(context, provides=['one', 'two'])
def bad_action():
context.one = 123
@action_for(context, provides=["check_output"])
def make_shell(*args, **kw):
context.sh = Shell(context.output, *args, **kw)
@action_for(context, depends_on=['something'])
def lonely_action():
pass
@action_for(context, provides=['some_attr'])
def dependency_action():
context.some_attr = True
@action_for(context)
def action1():
pass
@action_for(context, provides=['var1', 'foobar'])
def the_context_has_variables():
context.var1 = 123
context.foobar = "qwerty"
@action_for(context, depends_on=['some_attr'])
def my_action():
pass