Skip to content

Repair the test environment; aioresponses is a dev dependency - #189

Open
cmatte wants to merge 1 commit into
erwindouna:mainfrom
cmatte:fix/test-environment
Open

cmatte wants to merge 1 commit into
erwindouna:mainfrom
cmatte:fix/test-environment

Conversation

@cmatte

@cmatte cmatte commented Nov 7, 2026

Copy link
Copy Markdown

Proposed Changes

The test workflow on main has failed since May (last green run 19 May 2026). Two package updates break the suite:

aioresponses was also a runtime dependency, although only the tests use it. Every install of tadoasync pulled a test mocking library. It now sits in the dev group; deptry src reports no issues.

Checked locally with the workflow's commands (uv sync, uv run pytest --cov=tadoasync tests --cov-fail-under=95, ruff check, ruff format --check, mypy src) on Python 3.14: 83 passed, 49 snapshots, coverage 96.5%.

Related Issues

The test suite has failed on main since the lock moved to newer packages:

- PyJWT 2.15 rejects trailing characters after the signature, and the test
  token loaded from auth_token.txt ends with the file's newline
  ('Invalid crypto padding'). The tests now strip it.
- aioresponses does not support aiohttp 3.14 yet (ClientResponse needs
  stream_writer, pnuckowski/aioresponses#289). A uv constraint keeps the
  development lock on aiohttp 3.13 until it does; the published requirement
  (aiohttp>=3.0.0) is unchanged.

aioresponses was also listed as a runtime dependency although only the tests
use it, so every install pulled a test mocking library. It now sits in the
dev group.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@cmatte

cmatte commented Nov 7, 2026

Copy link
Copy Markdown
Author

@erwindouna The red "Verify" check is the label gate: contributors can't set labels. Suggested: ci for #189, and bugfix + breaking-change for #190 (a refused refresh token now raises TadoAuthenticationError instead of TadoBadRequestError). The test, lint and typing workflows are waiting for approval to run. Locally, with the workflow's commands, #189 gives 83 passed (coverage 96.5%) and #190 gives 95 passed (96.7%), with ruff, mypy and pylint clean.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant