{"library":"pytest-asyncio-cooperative","title":"pytest-asyncio-cooperative","description":"A pytest plugin that runs all async tests cooperatively using a single event loop, avoiding event loop conflicts and improving performance. Current version: 0.40.0, requires Python >=3.8. Released under MIT license; maintenance cadence is irregular.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install pytest-asyncio-cooperative"],"cli":null},"imports":["from pytest_asyncio_cooperative import pytest_configure","from pytest_asyncio_cooperative import pytest_configure"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"# conftest.py\nimport asyncio\nimport sys\n\n@pytest.fixture(scope=\"session\")\ndef event_loop():\n    loop = asyncio.new_event_loop()\n    asyncio.set_event_loop(loop)\n    yield loop\n    loop.close()\n\n# test_async.py\nimport pytest\n\n@pytest.mark.asyncio_cooperative\nasync def test_async_example():\n    await asyncio.sleep(0.1)\n    assert True","lang":"python","description":"Basic setup: define a session-scoped event_loop fixture (if not using async fixtures) and mark tests with @pytest.mark.asyncio_cooperative.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}