allure-framework / allure-python

Allure integrations for Python test frameworks
https://allurereport.org/
Apache License 2.0
713 stars 233 forks source link

Allure does not handle --last-failed on parametrized tests #773

Closed gryznar closed 9 months ago

gryznar commented 9 months ago

Consider this code:

import pytest

@pytest.mark.parametrize('param1, param2', [(1, 1)])
def test_foo(param1, param2):
    raise AssertionError

And execute with:

pytest --alluredir=allure

Wait for finish and:

pytest --alluredir=allure --last-failed

Expected: Second run should override first one. As a result there should be one test in Allure report.

Current: Allure cannot match parametrized tests and in report there are 2 tests.