import sys import os # Ensure the repository root is on Python path when tests run under pytest. # This helps environments where pytest's import discovery doesn't include the repo root. ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) if ROOT not in map(os.path.abspath, sys.path): sys.path.insert(0, ROOT)