1
0

fix: rename src/websocket to src/ws_manager to avoid websocket-client clash

selenium depends on websocket-client which installs a top-level
`websocket` package that shadows our src/websocket/ module on CI.
Renaming to ws_manager eliminates the conflict entirely — no more
sys.path hacks needed in conftest or Selenium tests.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Alexander Payne
2026-02-25 07:57:28 -05:00
parent e483748816
commit 3463f4e4a4
11 changed files with 18 additions and 43 deletions

View File

@@ -6,15 +6,6 @@ import sys
from pathlib import Path
from unittest.mock import MagicMock
# ── Fix websocket-client shadowing project's src/websocket/ ──────────────────
# selenium → websocket-client installs a top-level `websocket` package that
# shadows our src/websocket/ module. Ensure src/ is at the FRONT of sys.path
# so our module wins the import race.
_src = str(Path(__file__).resolve().parent.parent / "src")
if _src in sys.path:
sys.path.remove(_src)
sys.path.insert(0, _src)
import pytest
from fastapi.testclient import TestClient