def _(cache: FixtureCache = cache, ): cache.teardown_fixtures_for_scope(Scope.Module, testable_test.path) fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Module, testable_test.path) expect(fixtures_at_scope).equals({})
def _(cache: FixtureCache = cache, ): cache.teardown_fixtures_for_scope(Scope.Module, testable_test.path) fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Module, testable_test.path) assert fixtures_at_scope == {}
def _(cache: FixtureCache = cache, global_fixture=global_fixture): fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Global, Scope.Global) fixture = list(fixtures_at_scope.values())[0] assert len(fixtures_at_scope) == 1 assert fixture.fn == global_fixture
def _(cache: FixtureCache = cache, global_fixture=global_fixture): fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Global, Scope.Global) fixture = list(fixtures_at_scope.values())[0] expect(fixtures_at_scope).has_length(1) expect(fixture.fn).equals(global_fixture)
def _(cache: FixtureCache = cache, module_fixture=module_fixture): fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Module, testable_test.path) fixture = list(fixtures_at_scope.values())[0] assert len(fixtures_at_scope) == 1 assert fixture.fn == module_fixture
def _(cache: FixtureCache = cache, t: Test = my_test, default_fixture=default_fixture): fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Test, t.id) fixture = list(fixtures_at_scope.values())[0] assert len(fixtures_at_scope) == 1 assert fixture.fn == default_fixture
def _(cache: FixtureCache = cache, module_fixture=module_fixture): fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Module, testable_test.path) fixture = list(fixtures_at_scope.values())[0] expect(fixtures_at_scope).has_length(1) expect(fixture.fn).equals(module_fixture)
def _(cache: FixtureCache = cache, t: Test = my_test, default_fixture=default_fixture): fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Test, t.id) fixture = list(fixtures_at_scope.values())[0] expect(fixtures_at_scope).has_length(1) expect(fixture.fn).equals(default_fixture)
def _(cache: FixtureCache = cache, ): cache.teardown_global_fixtures() fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Global, Scope.Global) assert fixtures_at_scope == {}
def _(cache: FixtureCache = cache, t: Test = my_test): cache.teardown_fixtures_for_scope(Scope.Test, t.id) fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Test, t.id) assert fixtures_at_scope == {}
def _(cache: FixtureCache = cache, ): cache.teardown_global_fixtures() fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Global, Scope.Global) expect(fixtures_at_scope).equals({})
def _(cache: FixtureCache = cache, t: Test = my_test): cache.teardown_fixtures_for_scope(Scope.Test, t.id) fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Test, t.id) expect(fixtures_at_scope).equals({})