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

pytest_collection_modifyitems should try to run last instead of first #18

Merged
merged 1 commit into from
Jun 16, 2021

Conversation

matthewshirley
Copy link
Contributor

Fixes #17 where tests are incorrectly split if paired with mark expressions. Thanks for this great plugin, by the way. 🙌

]

tests_to_run = "".join(f"@pytest.mark.mark_one\ndef test_{num}(): pass\n" for num in range(1, 6))
tests_to_exclude = "".join(f"def test_{num}(): pass\n" for num in range(6, 11))
Copy link
Contributor Author

@matthewshirley matthewshirley Jun 15, 2021

Choose a reason for hiding this comment

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

You need tests that don't have the mark_one mark to reproduce this issue.

@jerry-git jerry-git self-requested a review June 15, 2021 12:17
@jerry-git
Copy link
Owner

Great finding and thanks for the fix 💪 🍬

@jerry-git jerry-git merged commit 058628d into jerry-git:master Jun 16, 2021
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.

Tests are incorrectly split if paired with mark expressions
2 participants