Skip to content

skipping: fix dynamic xfail mark added in runtest not respected #7490

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
merged 2 commits into from
Jul 15, 2020

Conversation

bluetech
Copy link
Member

Fixes #7486.

If a test runtest phase (not setup) dynamically adds a pytest.mark.xfail mark to the item, it should be respected, but it wasn't. This regressed in 3e6fe92 (not released).

Fix it by just always refreshing the mark if needed. This is mostly what was done before but in a more roundabout way.

I also sneaked in a trivial style commit I noticed.

bluetech added 2 commits July 14, 2020 00:45
If a test runtest phase (not setup) dynamically adds a pytest.mark.xfail
mark to the item, it should be respected, but it wasn't. This regressed
in 3e6fe92 (not released).

Fix it by just always refreshing the mark if needed. This is mostly what
was done before but in a more roundabout way.
@bluetech bluetech merged commit fe1fcfd into pytest-dev:master Jul 15, 2020
@bluetech bluetech deleted the fix-dynamic-runtest-xfail branch July 23, 2020 10:58
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

Successfully merging this pull request may close these issues.

Pytest 6: Dynamically adding xfail marker in test no longer ignores failure
2 participants