Skip to content

Don't convert built-in (reserved) pytest markers to allure tags (fix #817) #862

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

Merged

Conversation

sharovd
Copy link
Contributor

@sharovd sharovd commented May 17, 2025

Context

  • Fix the issue to prevent saving marks with parameters as labels → tag #817

  • Code changes:

    • The pytest_markers(item) method in utils.py has been simplified - now only "simple" user-defined pytest markers are converted to allure tags. Built-in (reserved) markers (e.g. skip, xfail, etc.) are now ignored. The approach was taken from allure-pytest-bdd implementation
  • Unit tests changes:

    • Existing tests in tag_test.py have been updated, new tests have been added for each built-in (reserved) marker to verify they are ignored
    • Renamed both the update and the new tests to make their purpose clearer
    • Removed test_pytest_marker_with_kwargs_native_encoding as a duplicate of test_pytest_marker_with_kwargs_utf_encoding - they looked identical
    • Updated the affected test in pytest_rerunfailures_test.py accordingly

Checklist

Copy link
Contributor

@delatrie delatrie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @sharovd ! Good job here!

Sorry for having kept you waiting for so long.

I would like to suggest a couple of tiny changes, please, check them out.

@delatrie delatrie force-pushed the fix-817-ignore-built-in-marks branch from 3f3ba87 to c3b3197 Compare June 9, 2025 14:21
@delatrie delatrie merged commit 4d67928 into allure-framework:master Jun 9, 2025
17 checks passed
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