How to use the ward.models.Scope.Global function in ward

To help you get started, we’ve selected a few ward examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github darrenburns / ward / ward / testing.py View on Github external
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
github darrenburns / ward / tests / test_suite.py View on Github external
    @fixture(scope=Scope.Global)
    def a():
        events.append("resolve a")
        yield "a"
        events.append("teardown a")
github darrenburns / ward / ward / fixtures.py View on Github external
def teardown_global_fixtures(self):
        self.teardown_fixtures_for_scope(Scope.Global, Scope.Global)