| 1 | # tests/conftest.py |
| 2 | import sys |
| 3 | from pathlib import Path |
| 4 | |
| 5 | # Ensure A0 framework root is first in sys.path so that |
| 6 | # `from helpers import ...` resolves to A0's helpers/, not |
| 7 | # the Commands plugin's local helpers/ directory. |
| 8 | a0_root = str(Path(__file__).resolve().parents[3]) # tests/ → _commands → plugins → a0 |
| 9 | while a0_root in sys.path: |
| 10 | sys.path.remove(a0_root) |
| 11 | sys.path.insert(0, a0_root) |