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

Function test_uninstalled_package_paths

tests/test_instance_config.py:30–43  ·  view source on GitHub ↗
(modules_tmp_path, purge_module)

Source from the content-addressed store, hash-verified

28
29
30def test_uninstalled_package_paths(modules_tmp_path, purge_module):
31 app = modules_tmp_path / "config_package_app"
32 app.mkdir()
33 (app / "__init__.py").write_text(
34 "import os\n"
35 "import flask\n"
36 "here = os.path.abspath(os.path.dirname(__file__))\n"
37 "app = flask.Flask(__name__)\n"
38 )
39 purge_module("config_package_app")
40
41 from config_package_app import app
42
43 assert app.instance_path == os.fspath(modules_tmp_path / "instance")
44
45
46def test_uninstalled_namespace_paths(tmp_path, monkeypatch, purge_module):

Callers

nothing calls this directly

Calls 1

purge_moduleFunction · 0.85

Tested by

no test coverage detected