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

Function test_prefix_package_paths

tests/test_instance_config.py:99–111  ·  view source on GitHub ↗
(
    limit_loader, modules_tmp_path, modules_tmp_path_prefix, purge_module, site_packages
)

Source from the content-addressed store, hash-verified

97
98
99def test_prefix_package_paths(
100 limit_loader, modules_tmp_path, modules_tmp_path_prefix, purge_module, site_packages
101):
102 app = site_packages / "site_package"
103 app.mkdir()
104 (app / "__init__.py").write_text("import flask\napp = flask.Flask(__name__)\n")
105 purge_module("site_package")
106
107 import site_package
108
109 assert site_package.app.instance_path == os.fspath(
110 modules_tmp_path / "var" / "site_package-instance"
111 )

Callers

nothing calls this directly

Calls 1

purge_moduleFunction · 0.85

Tested by

no test coverage detected