From 4da9ef8c70edd5cda2eb91fd72a9c65abb77d52b Mon Sep 17 00:00:00 2001 From: ilia Date: Wed, 5 Aug 2026 18:57:41 -0400 Subject: [PATCH] Ensure repo root on sys.path before test collection --- tests/conftest.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index d0b80c5..27e29df 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -12,9 +12,12 @@ import urllib.error import urllib.request from pathlib import Path -import pytest - +# Repo root on sys.path for `slack_export` / `server` (CI and local). REPO_ROOT = Path(__file__).resolve().parents[1] +if str(REPO_ROOT) not in sys.path: + sys.path.insert(0, str(REPO_ROOT)) + +import pytest FIXTURE_EXPORT = REPO_ROOT / "tests" / "fixtures" / "mini-export" TEST_MANIFEST = REPO_ROOT / "tests" / "fixtures" / "test-manifest.json"