gabriel / musehub public
fix BREAKING task/remove-anyio-marks #2 / 2
gabriel · 70 days ago · Apr 11, 2026 · Diff

fix: remove @pytest.mark.anyio from all test files

asyncio_mode = auto in pyproject.toml makes the mark redundant. Having it alongside pytest-asyncio fixtures (db_session) causes teardown to fail with 'Task got Future attached to a different loop' because anyio creates its own event loop that conflicts with pytest-asyncio's loop during fixture cleanup.

Removed from 85 test files (decorator and pytestmark = ... forms). Fixes test doubling (PASSED then ERROR), teardown failures, and the suite-wide freeze caused by leaked asyncpg connections.

sha256:8d27b86a45e0ccaa37f75b8cffe41b0413fbd38a2bb06e02169e2a45d54cb547 sha
sha256:5a68f0c23ff7f0fb85e705f9628d779d30cc8a01d65581eb812cb9e16e05d20a snapshot

0 comments

No comments yet. Be the first to start the discussion.

To add a comment, use the Muse CLI: muse hub commit comment sha256:8d27b86a45e0ccaa37f75b8cffe41b0413fbd38a2bb06e02169e2a45d54cb547 --body "your comment"