from planterbox import (
    step,
    hook,
)


hooks_run = set()


@hook('before', 'feature')
def before_feature_hook(feature_suite):
    global hooks_run
    hooks_run.add(('before', 'feature'))


@hook('before', 'scenario')
def before_scenario_hook(scenario_test):
    global hooks_run
    hooks_run.add(('before', 'scenario'))


@hook('before', 'step')
def before_step_hook(step_text):
    global hooks_run
    hooks_run.add(('before', 'step'))


@step(r'I verify that all before hooks have run')
def verify_before_hooks(world):
    global hooks_run
    assert hooks_run == {('before', 'feature'),
                         ('before', 'scenario'),
                         ('before', 'step'),
                         }


@hook('after', 'feature')
def after_feature_hook(feature_suite):
    global hooks_run
    hooks_run.add(('after', 'feature'))
    assert hooks_run == {('before', 'feature'),
                         ('before', 'scenario'),
                         ('before', 'step'),
                         ('after', 'feature'),
                         ('after', 'scenario'),
                         ('after', 'step'),
                         }


@hook('after', 'scenario')
def after_scenario_hook(scenario_test):
    global hooks_run
    hooks_run.add(('after', 'scenario'))


@hook('after', 'step')
def after_step_hook(step_text):
    global hooks_run
    hooks_run.add(('after', 'step'))

@@ -242,33 +242,24 @@
 enario_hook(
-scenario_
 test):%0A    g
@@ -514,13 +514,12 @@
 oks(
-world
+test
 ):%0A 
@@ -1196,25 +1196,16 @@
 io_hook(
-scenario_
 test):%0A 

Clarify arguments in tests slightly