Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allure report's tags support the display of duplicate tag names #832

Open
1 of 3 tasks
tdxs8848 opened this issue Nov 12, 2024 · 0 comments
Open
1 of 3 tasks

Allure report's tags support the display of duplicate tag names #832

tdxs8848 opened this issue Nov 12, 2024 · 0 comments

Comments

@tdxs8848
Copy link

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:

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant