Files
torlando-agent[bot] 96d007870c fix(tests): add build_scripts conftest so _build_helpers is importable on CI
The pre-scripts now import their sibling _build_helpers; the build_scripts tests
load those scripts in-process, so the import needs the repo root on sys.path. CI
runs bare `pytest` (which, unlike `python -m pytest` locally, does NOT add the cwd
to sys.path), so the import failed only there. A conftest.py that puts the repo
root on sys.path fixes it for any invocation. (The standalone-exec subprocess test
got its own sys.path line in the prior commit.)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UWZuYkHBRqNb6BZHV8sTG5
2026-06-23 00:22:12 -04:00

9 lines
416 B
Python

import sys
from pathlib import Path
# The pre-build scripts (patch_*, sync_file_libdeps) import their sibling
# `_build_helpers` from the repo root. Put the repo root on sys.path so the tests
# can load those scripts regardless of how pytest was invoked -- CI runs bare
# `pytest ...`, which (unlike `python -m pytest`) does NOT add the cwd to sys.path.
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))