(
limit_loader, modules_tmp_path, modules_tmp_path_prefix, purge_module, monkeypatch
)
| 78 | |
| 79 | |
| 80 | def 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 | |
| 99 | def test_prefix_package_paths( |
nothing calls this directly
no test coverage detected