rust_changes: append the repository root to sys.path instead of prepending tools/
Prepending tools/ made unittest discovery import tools/test_decoration_parity.py in place of tests/test_decoration_parity.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -9,8 +9,9 @@ import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
||||
import release_train # noqa: E402
|
||||
# The repository root, appended so a script run finds `tools` without shadowing anything already importable.
|
||||
sys.path.append(str(Path(__file__).resolve().parents[2]))
|
||||
from tools import release_train # noqa: E402
|
||||
|
||||
# The root workspace's manifest and toolchain files: the launcher's path crates inherit from them.
|
||||
ROOT_RUST = {"Cargo.toml", "Cargo.lock", "rust-toolchain.toml", "rustfmt.toml", "clippy.toml"}
|
||||
|
||||
Reference in New Issue
Block a user