Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tests/oo/test_oo_scoring_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import ast
import json
import subprocess
from pathlib import Path
from typing import TYPE_CHECKING

Expand Down Expand Up @@ -86,6 +87,11 @@ def test_cli_exit_code_and_table(
capsys: pytest.CaptureFixture[str],
) -> None:
_fixture(tmp_path)
# The fixture stands for a project of its own: the gate names files
# from its repository root, so make tmp_path that root. Otherwise, with
# TMPDIR inside a checkout, the scratch root is the repository (see
# ``separate_project``) and the file reads ``<test dir>/pkg/broken.py``.
subprocess.run(["git", "init", "-q"], cwd=tmp_path, check=True)
monkeypatch.chdir(tmp_path)
code = dispatch(["oo", "pkg"])
out = capsys.readouterr().out
Expand Down
Loading