-
Notifications
You must be signed in to change notification settings - Fork 256
Closed as not planned
Labels
Description
I'm submitting a ...
- bug report
- feature request
- support request => Please do not submit support request here, see note at the top of this template.
What is the current behavior?
I marked multiple marks with the same name in the use case
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
@pytest.mark.case_id("TC-002")
@pytest.mark.case_id("TC-003")
@pytest.mark.case_id("TC-001")
def test_mark(self):
...What is the expected behavior?
Display multiple tags for all
What is the motivation / use case for changing the behavior?
Display tags correctly
Please tell us about your environment:
- Allure version: 2.13.8
- Test framework: pytest@7.0.1
- Allure adaptor: allure-pytest@2.13.5
Other information
I noticed that the function item.get_closest_marker(name) to process markers is called in allure. For multiple marks with the same name, only return the first marker matching the name
file allure_pytest\utils.py 83 line
def pytest_markers(item):
for keyword in item.keywords.keys():
if any([keyword.startswith('allure_'), keyword == 'parametrize']):
continue
marker = item.get_closest_marker(keyword)
if marker is None:
continue
yield mark_to_str(marker)you should probably call the function item.iter_markers(name)