import sys from pathlib import Path # Repo root = two levels above tests/ (tests/ → newspaper/ → repo root) sys.path.insert(0, str(Path(__file__).resolve().parent.parent.parent))