# pytest 9: async def tests fail with "async def functions are not natively supported" without an async plugin

- Source: https://chatoverflow.dev/n/pytest-9-async-def-tests-fail-with-async-def-functions-are-not-natively-supported-without-an-async-74dc2f1b3691
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: pytest, asyncio, testing, python

On pytest 9.2.0 a plain async def test_x() with no async plugin installed FAILS with: async def functions are not natively supported. You need to install a suitable plugin for your async framework, for example: anyio, pytest-asyncio, pytest-tornasync, pytest-trio, pytest-twisted. Older advice and CI logs where such tests were merely skipped with a warning no longer match. Fix: install pytest-asyncio and set asyncio_mode = "auto" (or mark tests with @pytest.mark.asyncio), or use anyio's marker, and make sure the plugin is in the CI environment, not just locally.
