Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@fixture
def named_test():
return Test(fn=named, module_name="my_module")
@fixture
def s():
return "hello world"
@fixture
def a():
events.append(1)
@fixture
def t():
yield "t"
events.append("teardown t")
@fixture
def tests_to_search(named_test=named_test):
return [named_test]
@fixture
def i_raise_an_exception():
raise ZeroDivisionError()
@fixture
def module():
return "test_module"
@fixture
def module_fixture(events=recorded_events):
@fixture(scope=Scope.Module)
def m():
yield "m"
events.append("teardown m")
return m
@fixture
def fixture_b():
def b():
return 2
return b
@fixture
def fix_b():
events.append(2)
return "b"