fix: drop conftest sys.path hack; rely on pytest pythonpath
CI / skip-ci-check (pull_request) Successful in 30s
CI / secret-scan (pull_request) Successful in 29s
CI / python-ci (pull_request) Failing after 47s

This commit is contained in:
2026-08-05 19:14:12 -04:00
parent 62ccf82028
commit ef68d4fb8e
+2 -8
View File
@@ -6,19 +6,15 @@ import importlib.util
import json
import shutil
import socket
import sys
import time
import urllib.error
import urllib.request
from pathlib import Path
# 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
REPO_ROOT = Path(__file__).resolve().parents[1]
FIXTURE_EXPORT = REPO_ROOT / "tests" / "fixtures" / "mini-export"
TEST_MANIFEST = REPO_ROOT / "tests" / "fixtures" / "test-manifest.json"
@@ -47,7 +43,6 @@ def fixture_export_path() -> Path:
@pytest.fixture
def export(fixture_export_path):
sys.path.insert(0, str(REPO_ROOT))
from slack_export import SlackExport
return SlackExport(fixture_export_path)
@@ -93,7 +88,6 @@ def review_server(tmp_path_factory):
import threading
from http.server import ThreadingHTTPServer
sys.path.insert(0, str(REPO_ROOT))
from server import ReviewHandler
from slack_export import SlackExport