Ensure repo root on sys.path before test collection
This commit is contained in:
+5
-2
@@ -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"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user