fix: correct test fixture names and add aiosqlite dependency
- 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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.5
parent
41defa998a
commit
2a35ade607
@@ -28,6 +28,7 @@ dev = [
|
||||
"ruff>=0.1.0",
|
||||
"mypy>=1.7.0",
|
||||
"pre-commit>=3.0.0",
|
||||
"aiosqlite>=0.19.0",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user