Skip to content
Myr

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 file

Take it

1from 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