def test_nested(): assert steps.get_current() is None inner_level = step_outer() assert steps.get_current() is None assert inner_level == 2
def step_a(*, step): assert steps.get_current() is not None return step.level
def test_single(): assert steps.get_current() is None step_a() assert steps.get_current() is None