conftest.py
This file
Path
tests/conftest.py
10 lines · 262 bytes · Python
Last changed by
✅ Fix flaky `app_dir` and `launch` tutorial tests under `xdist` (#1951)Yurii Motovbefore adoptiond8ab87d
History of this fileTake it
✅ Fix flaky `app_dir` and `launch` tutorial tests under `xdist` (#1951)Yurii Motovbefore adoptiond8ab87d
lines 1–10why, one step back1from pathlib import Path23import pytest4import typer567@pytest.fixture(name="app_dir")8def patch_app_dir(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Path:9 monkeypatch.setattr(typer, "get_app_dir", lambda _app_name: str(tmp_path))10 return tmp_path