-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
fix #13031: use the concrete id NOTSET for the empty parameter list #13073
base: main
Are you sure you want to change the base?
fix #13031: use the concrete id NOTSET for the empty parameter list #13073
Conversation
…ter list stand-in this ensures we dont invoke idfunc with the internal NOTSET enum token
c87c874
to
da7251c
Compare
@@ -0,0 +1,2 @@ | |||
``pytest.mark.parametrize([], isfunc=...)`` will no longer call the idfunc with the internal ``NOTSET`` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isfunc
? Is that correct?
Also can you rewrite this from the POV of an user? I mean the description by itself is hard to understand without reading the associated issue first.
import pytest | ||
|
||
def idfunc(value): | ||
raise ValueError() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIUC idfunc
is no longer being called when parametrize receives an empty list, is that it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correct , the exception here is to ensure its never getting triggered
def idfunc(value): | ||
raise ValueError() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
def idfunc(value): | |
raise ValueError() | |
def idfunc(value): | |
raise ValueError() |
this ensures we dont invoke idfunc with the internal NOTSET enum token
closes #13031