MCPcopy
hub / github.com/pallets/flask / test_apps

Function test_apps

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

setFunction · 0.85
popMethod · 0.45

Tested by

no test coverage detected