Our build framework sets PYTEST_PLUGINS to contain 'asyncio' and so the pytest_plugins = 'pytest_asyncio' line tries to load the plugin 2nd time. This emits additional warning and so all tests that check the expected number of warnings fails here. --- pytest_asyncio-0.25.2/tests/hypothesis/test_base.py.orig +++ pytest_asyncio-0.25.2/tests/hypothesis/test_base.py @@ -55,8 +55,6 @@ from hypothesis import given import hypothesis.strategies as st - pytest_plugins = 'pytest_asyncio' - @pytest.fixture(scope="module") def event_loop(): loop = asyncio.get_event_loop_policy().new_event_loop() --- pytest_asyncio-0.25.2/tests/test_event_loop_fixture_finalizer.py.orig +++ pytest_asyncio-0.25.2/tests/test_event_loop_fixture_finalizer.py @@ -108,8 +108,6 @@ import asyncio import pytest - pytest_plugins = 'pytest_asyncio' - @pytest.fixture def event_loop(): loop = asyncio.get_event_loop_policy().new_event_loop() @@ -136,8 +134,6 @@ import asyncio import pytest - pytest_plugins = 'pytest_asyncio' - @pytest.mark.asyncio async def test_ends_with_unclosed_loop(): asyncio.set_event_loop(asyncio.new_event_loop()) --- pytest_asyncio-0.25.2/tests/test_event_loop_fixture.py.orig +++ pytest_asyncio-0.25.2/tests/test_event_loop_fixture.py @@ -65,8 +65,6 @@ import asyncio import pytest - pytest_plugins = 'pytest_asyncio' - @pytest.mark.asyncio async def test_something(): async def generator_fn():