# RuntimeWarning: coroutine 'test_async_func' was never awaited

- **ID:** `python/pytest-asyncio-coroutine-not-awaited`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

An async test function was not awaited, often because the test was not marked with @pytest.mark.asyncio or the asyncio mode is not set to auto.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 0.21 | active | — | — |

## Workarounds

1. **** (98% success)
   ```
   import pytest

@pytest.mark.asyncio
async def test_async_func():
    result = await some_async_call()
    assert result == expected
   ```
2. **** (95% success)
   ```
   [pytest]
asyncio_mode = auto
This automatically treats async tests as asyncio tests.
   ```

## Dead Ends

- **** — pytest-asyncio handles the event loop; manually running can cause conflicts. (90% fail)
- **** — This changes the test to synchronous and may not test the intended behavior. (80% fail)
