Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def scope_key_from(self, scope: Scope) -> ScopeKey:
if scope == Scope.Test:
return self.id
elif scope == Scope.Module:
return self.path
else:
return Scope.Global
@fixture(scope=Scope.Global)
def a():
events.append("resolve a")
yield "a"
events.append("teardown a")
def teardown_global_fixtures(self):
self.teardown_fixtures_for_scope(Scope.Global, Scope.Global)