Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
Expand All @@ -20,4 +21,4 @@ jobs:
- run: ruff check src/ tests/
- run: ruff format --check src/ tests/
- run: mypy src/
- run: pytest
- run: pytest -v --timeout=30
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ dev = [
"pytest-httpx>=0.34",
"pytest-xdist>=3.0",
"pytest-cov>=5.0",
"pytest-timeout>=2.3",
"ruff>=0.8",
"mypy>=1.13",
"mypy-protobuf>=3.6",
Expand Down Expand Up @@ -88,6 +89,7 @@ plugins = ["pydantic.mypy"]
testpaths = ["tests"]
asyncio_mode = "auto"
addopts = "-n auto -m 'not e2e'"
timeout = 30
markers = [
"e2e: End-to-end smoke tests against the live Tesla Fleet API (requires TESLA_ACCESS_TOKEN)",
]
Expand Down
13 changes: 7 additions & 6 deletions tests/telemetry/test_tui.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,14 +310,15 @@ async def test_unknown_field_goes_to_diagnostics(self) -> None:

@pytest.mark.asyncio
async def test_queue_overflow_drops_silently(self) -> None:
# Test the overflow behavior directly without Textual's run_test(),
# which deadlocks on Python 3.11 due to ContextVar + event loop
# scheduling differences between 3.11 and 3.12+.
app = TelemetryTUI(vin=VIN)
async with app.run_test():
# Fill the queue.
for i in range(110):
await app.push_frame(_frame(("BatteryLevel", 8, 80 - i, "int")))
for i in range(110):
await app.push_frame(_frame(("BatteryLevel", 8, 80 - i, "int")))

# No exception should be raised — overflow is silent.
assert app._queue.qsize() <= 100
# No exception should be raised — overflow is silent.
assert app._queue.qsize() <= 100

@pytest.mark.asyncio
async def test_server_info_setters(self) -> None:
Expand Down