Skip to content

Allow applying markers via case(..., marks=...) #8

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

smheidrich
Copy link

@smheidrich smheidrich commented Aug 1, 2023

My suggestion for how to implement #7 that I mentioned at the end of that issue. Adds a new marks parameter to Parametrization.case(), in analogy to pytest's own pytest.param(..., marks=...).

As I wrote in #7, this solution has the drawback of introducing a new reserved keyword argument for case(), but I still find it so much more ergonomic than the alternatives that to me it would be worth it. Might need to wait until the next major release though because it should be considered a breaking change...

Thoughts?

@smheidrich smheidrich changed the title Add marks kwarg to case(), allow applying markers Allow applying markers via case(..., marks=...) Aug 1, 2023
@beebikun
Copy link

That would be super helpful! I was just about to suggest the same changes.

But I think, maybe _marks is a better name, so there were less chances of names clashing?

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.

2 participants