Skip to content

Add support the display of duplicate tag names (fix #832) #852

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sharovd
Copy link
Contributor

@sharovd sharovd commented Apr 5, 2025

Context

  • Fix the issue Allure report's tags support the display of duplicate tag names #832
  • All user-defined markers (e.g. case_id) will be fully collected according to the described problem
  • Only the closest built-in pytest markers (e.g. skipif) will still be collected according to the existing tests
  • Modified pytest_markers() method and corresponding test test_show_reserved_pytest_markers_full_decorator()

Checklist

P.S.: This is my first open source contribution. I'm happy to improve it if there's anything that needs to be changed or improved. Thanks for reviewing!

@delatrie
Copy link
Contributor

delatrie commented Apr 22, 2025

Hi, @sharovd

Thank you for investing your time in allure-pytest.

The thing is that allure-pytest is unique among other Allure integrations in that it tries to convert to tags something that doesn't really fit into the idea of tags: pytest markers with arguments. I believe implementing this was a mistake, as it creates more problems than it solves. We shouldn't also convert built-in markers, as we have better options to indicate their effect. I've described it in more detail in the issue.

And if we don't convert the abovementioned markers, the problem with missing tags will resolve itself (multiple markers with no arguments means the tag values will be the same, and there is no point in having multiple tags with absolutely the same values).

We have an existing issue that addresses just that: #817, and we should implement it. If you're still willing to work on markers-to-tags conversion, you may take the implementation from allure-pytest-bdd and adjust the tests accordingly.

@delatrie delatrie force-pushed the fix-832-multiple-markers branch from b90428c to 044db77 Compare April 24, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants