Closed
Description
In the following code:
async def test1():
assert Fail
@pytest.mark.asyncio
async def test2():
assert Fail
- test1 is silently skipped and marked as successful.
- test2 follows the same fate if pytest-asyncio is not installed.
Both use cases can be very easily triggered by distraction in real life; the sensible behaviour should be that both tests fail no matter what:
- Using the @pytest.mark.asyncio decorator without pytest-asyncio installed should cause an error
- An error should be raised if a test function returns a coroutine