From 2a35ade60796423c9dfba7394414f7c205dd738e Mon Sep 17 00:00:00 2001 From: Patrick Selamy Date: Sun, 4 Jan 2026 17:18:34 -0500 Subject: [PATCH] fix: correct test fixture names and add aiosqlite dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Revert underscore-prefixed fixture parameters (breaks pytest discovery) - Use # noqa: ARG002 comments instead - Add aiosqlite to dev dependencies for SQLite-based tests 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- pyproject.toml | 1 + tests/ingestor/test_clob_client.py | 6 +++--- tests/ingestor/test_websocket.py | 4 +++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d659f3a..d8f08a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,7 @@ dev = [ "ruff>=0.1.0", "mypy>=1.7.0", "pre-commit>=3.0.0", + "aiosqlite>=0.19.0", ] [build-system] diff --git a/tests/ingestor/test_clob_client.py b/tests/ingestor/test_clob_client.py index 03567f8..9014d7b 100644 --- a/tests/ingestor/test_clob_client.py +++ b/tests/ingestor/test_clob_client.py @@ -118,20 +118,20 @@ class TestClobClient: with patch("polymarket_insider_tracker.ingestor.clob_client.BaseClobClient") as mock: yield mock.return_value - def test_init_defaults(self, _mock_base_client: MagicMock) -> None: + def test_init_defaults(self, mock_base_client: MagicMock) -> None: # noqa: ARG002 """Test client initialization with defaults.""" client = ClobClient() assert client._host == "https://clob.polymarket.com" assert client._max_retries == 3 - def test_init_with_env_api_key(self, _mock_base_client: MagicMock) -> None: + def test_init_with_env_api_key(self, mock_base_client: MagicMock) -> None: # noqa: ARG002 """Test client reads API key from environment.""" with patch.dict("os.environ", {"POLYMARKET_API_KEY": "test-key"}): client = ClobClient() assert client._api_key == "test-key" - def test_init_with_explicit_api_key(self, _mock_base_client: MagicMock) -> None: + def test_init_with_explicit_api_key(self, mock_base_client: MagicMock) -> None: # noqa: ARG002 """Test client uses explicitly provided API key.""" client = ClobClient(api_key="explicit-key") assert client._api_key == "explicit-key" diff --git a/tests/ingestor/test_websocket.py b/tests/ingestor/test_websocket.py index 5b280e0..a758b61 100644 --- a/tests/ingestor/test_websocket.py +++ b/tests/ingestor/test_websocket.py @@ -223,7 +223,9 @@ class TestTradeStreamHandler: @pytest.mark.asyncio async def test_connect_sends_subscription( - self, handler: TradeStreamHandler, _on_state_change_mock: AsyncMock + self, + handler: TradeStreamHandler, + on_state_change_mock: AsyncMock, # noqa: ARG002 ) -> None: """Test that connection sends subscription message.""" mock_ws = AsyncMock()