provide-testkit 2025-12-23
Harden async fixtures and improve test configuration
8 files · 95+ · 18-

Async fixture hardening

2 files changed
  • async_fixtures.py Use pytest_asyncio.fixture when available, switch to get_running_loop, break task child cycles before cancellation, filter out current task and tasks with children
  • test_async_fixtures.py New test file covering async fixture behavior
  • Rewrote clean_event_loop fixture to safely cancel pending tasks by breaking child cycles and excluding the current task, preventing recursive cancellation errors harden behavioral
    1 file
    • async_fixtures.py
  • Added pytest-asyncio fixture decorator support with fallback to plain pytest.fixture streamline behavioral
    1 file
    • async_fixtures.py

Test configuration improvements

2 files changed
  • pyproject.toml Added ruff per-file annotation ignores for tests, removed --dist load from addopts, added parallel execution guidance comment
  • conftest.py Registered provide.testkit.process.fixtures as pytest plugin
  • Removed –dist load from default pytest addopts to prevent xdist hangs and added per-file ruff ignores for test annotations baseline internal
    2 files
    • pyproject.toml
    • conftest.py