mirror of
https://github.com/torlando-tech/pyxis.git
synced 2026-07-02 04:11:43 +00:00
96d007870c
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
9 lines
416 B
Python
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]))
|