-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
topic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errorstype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch
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
Metadata
Metadata
Assignees
Labels
topic: reportingrelated to terminal output and user-facing messages and errorsrelated to terminal output and user-facing messages and errorstype: enhancementnew feature or API change, should be merged into features branchnew feature or API change, should be merged into features branch