Skip to content

Commit 2340292

Browse files
igerberclaude
andcommitted
Move shared DGP to tests/helpers/, remove global pythonpath
P3: Move edid_dgp.py into tests/helpers/ and add the helpers directory to sys.path via conftest.py instead of the global pythonpath = ["tests"] setting. This avoids making every module under tests/ importable as a top-level module. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent eec1fe8 commit 2340292

3 files changed

Lines changed: 4 additions & 1 deletion

File tree

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ python-packages = ["diff_diff"]
8989

9090
[tool.pytest.ini_options]
9191
testpaths = ["tests"]
92-
pythonpath = ["tests"]
9392
python_files = "test_*.py"
9493
# Exclude slow tests by default; use `pytest -m ''` to run all tests
9594
addopts = "-v --tb=short -m 'not slow'"

tests/conftest.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
import math
99
import os
1010
import subprocess
11+
import sys
12+
13+
# Make tests/helpers/ importable without adding all of tests/ to sys.path
14+
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "helpers"))
1115

1216
# Force non-interactive matplotlib backend before any test imports it.
1317
# Prevents plt.show() from blocking the test suite on a GUI window.

0 commit comments

Comments
 (0)