An empty folder to run in, headless, outside any `uv run`.
(tmp_path: Path, monkeypatch: pytest.MonkeyPatch)
| 107 | |
| 108 | @pytest.fixture |
| 109 | def project(tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> Path: |
| 110 | """An empty folder to run in, headless, outside any `uv run`.""" |
| 111 | folder = tmp_path / SECRET |
| 112 | folder.mkdir() |
| 113 | monkeypatch.chdir(folder) |
| 114 | monkeypatch.setenv("CREWAI_DMN", "true") |
| 115 | # `uv run pytest` sets this, which would run declarative flows in-process. |
| 116 | monkeypatch.delenv("UV_RUN_RECURSION_DEPTH", raising=False) |
| 117 | monkeypatch.delenv(run_crew_module.RUN_COUNTED_ENV, raising=False) |
| 118 | monkeypatch.setattr(sys, "path", list(sys.path)) |
| 119 | # The key crewAI's default model needs, so a run counts no missing key |
| 120 | # unless the test takes it away. |
| 121 | monkeypatch.setenv("OPENAI_API_KEY", "sk-test") |
| 122 | return folder |
| 123 | |
| 124 | |
| 125 | @pytest.fixture |
nothing calls this directly
no outgoing calls
no test coverage detected