You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@allure.feature('page')
class TestPage(object):
@allure.story('story1')
@pytest.mark.asyncio_cooperative
async def test_01(self):
with allure.step("execute test_02"):
# await asyncio.sleep(1)
print("test_01")
allure-python incompatibility with pytest-asyncio-cooperative. Test cases are displayed in the report. but no execution details are shown
No information about test execution is available.
The text was updated successfully, but these errors were encountered:
This is because pytest-asyncio-cooperative messes with an expected lifecycle of a test. It calls a test function directly inside its own event loop before allure-pytest even knows that there actually is a test function. So, when the test steps are created allure-pytest cannot relate them to a test result and basically throws them away.
Here is the place, where test function is called by pytest-asyncio-cooperative (through test_wrapper):
And then, deep inside pytest, pytest_runtest_call creates the test result and pytest_runtest_logfinish closes it. Since the steps were already thrown away at this point the test result remains empty.
allure-python incompatibility with pytest-asyncio-cooperative. Test cases are displayed in the report. but no execution details are shown
No information about test execution is available.
The text was updated successfully, but these errors were encountered: