MCPcopy Create free account
hub / github.com/pallets/flask / test_apps

Function test_apps

tests/conftest.py:73–82  ·  view source on GitHub ↗
(monkeypatch)

Source from the content-addressed store, hash-verified

71
72@pytest.fixture
73def test_apps(monkeypatch):
74 monkeypatch.syspath_prepend(os.path.join(os.path.dirname(__file__), "test_apps"))
75 original_modules = set(sys.modules.keys())
76
77 yield
78
79 # Remove any imports cached during the test. Otherwise "import app"
80 # will work in the next test even though it's no longer on the path.
81 for key in sys.modules.keys() - original_modules:
82 sys.modules.pop(key)
83
84
85@pytest.fixture(autouse=True)

Callers

nothing calls this directly

Calls 2

setFunction · 0.70
popMethod · 0.45

Tested by

no test coverage detected