コード例 #1
0
def _(cache: FixtureCache = cache):
    teardown_results = cache.teardown_global_fixtures(capture_output=True)

    # The cache contains a single global resolved fixture, which writes to sout/serr during teardown
    assert len(teardown_results) == 1
    assert teardown_results[0].sout == "stdout\n"
    assert teardown_results[0].serr == "stderr"
コード例 #2
0
def _(cache: FixtureCache = cache, events: List = recorded_events):
    cache.teardown_global_fixtures()

    assert events == ["teardown g"]
コード例 #3
0
def _(cache: FixtureCache = cache):
    cache.teardown_global_fixtures()

    fixtures_at_scope = cache.get_fixtures_at_scope(Scope.Global, Scope.Global)

    assert fixtures_at_scope == {}