Skip to content

Commit a00b8d4

Browse files
ahrzbclaude-agent-ahrzb[bot]
authored andcommitted
fix(ci): declare pythonpath so the root benchmarks package resolves
CI caught what the local run could not. Both packages' test suites import `benchmarks.serving_scenarios` (the shared three-way parity fixtures), which lives at the repo root. That resolved locally only because `python -m pytest` puts the current directory on sys.path; CI runs the `pytest` console script, which does not, so collection failed on two modules. Declare it instead of relying on the invocation: pythonpath = ["."] at the workspace root, ["../.."] in each package so a package-local `pytest` works too. Verified with CI's exact command, `uv run pytest -q`: 835 passed, 13 xfailed. Each package also gates on its own -- confit 250+1, sql-transform 585+12, which sums to the same 848.
1 parent ba030d1 commit a00b8d4

3 files changed

Lines changed: 11 additions & 0 deletions

File tree

packages/confit/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,7 @@ features = ["pyo3/extension-module"]
2323

2424
[tool.pytest.ini_options]
2525
python_files = ["*_test.py", "test_*.py"]
26+
# The repo-root `benchmarks` package carries the shared serving-scenario
27+
# parity fixtures used by these tests.
28+
pythonpath = ["../.."]
2629
testpaths = ["tests"]

packages/sql-transform/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,7 @@ features = ["pyo3/extension-module"]
2929

3030
[tool.pytest.ini_options]
3131
python_files = ["*_test.py", "test_*.py"]
32+
# The repo-root `benchmarks` package carries the shared serving-scenario
33+
# parity fixtures used by these tests.
34+
pythonpath = ["../.."]
3235
testpaths = ["tests", "sql_transform"]

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ known-third-party = ["datafusion", "duckdb"]
4848

4949
[tool.pytest.ini_options]
5050
python_files = ["*_test.py", "test_*.py"]
51+
# `benchmarks/` lives at the repo root and is imported by both packages' test
52+
# suites (the serving scenarios are the shared parity fixtures). `python -m
53+
# pytest` would put the cwd on sys.path and hide this; the `pytest` console
54+
# script does not, so state it.
55+
pythonpath = ["."]
5156
# Scope collection: the duckdb/ source clone (reference corpus) carries its own
5257
# test_*.py scripts that break under our pytest. Every package's tests are
5358
# listed so `pytest` from the repo root is the whole gate.

0 commit comments

Comments
 (0)