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

Function test_installed_package_paths

tests/test_instance_config.py:80–96  ·  view source on GitHub ↗
(
    limit_loader, modules_tmp_path, modules_tmp_path_prefix, purge_module, monkeypatch
)

Source from the content-addressed store, hash-verified

78
79
80def test_installed_package_paths(
81 limit_loader, modules_tmp_path, modules_tmp_path_prefix, purge_module, monkeypatch
82):
83 installed_path = modules_tmp_path / "path"
84 installed_path.mkdir()
85 monkeypatch.syspath_prepend(installed_path)
86
87 app = installed_path / "installed_package"
88 app.mkdir()
89 (app / "__init__.py").write_text("import flask\napp = flask.Flask(__name__)\n")
90 purge_module("installed_package")
91
92 from installed_package import app
93
94 assert app.instance_path == os.fspath(
95 modules_tmp_path / "var" / "installed_package-instance"
96 )
97
98
99def test_prefix_package_paths(

Callers

nothing calls this directly

Calls 1

purge_moduleFunction · 0.85

Tested by

no test coverage detected