-
-
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
Allow custom fixture names for fixtures #1444
Allow custom fixture names for fixtures #1444
Conversation
c65bf43
to
4381248
Compare
LGTM but I'd rather let someone else do the merge as I don't know the fixture code 😉 Thanks! |
LGTM as well, but i'd like @hpk42 to be the one to merge this one |
👍 from me as well, I just think it is missing some mention in the docs (inclusive providing the rationale). |
Should I just add a new entry to the end of the fixture doc? |
When defining a fixture in the same module as where it is used, the function argument shadows the fixture name, which a) annoys pylint and b) can lead to bugs where you forget to request a fixture into a test method. This allows one to define fixtures with a different name than the name of the function, bypassing that problem.
4381248
to
9577120
Compare
Pushed a new version that updates the docstring (oops, forgot to do that originally). Hopefully this suffices for docs. |
I guess so. Thanks! |
anything i can do to make merging this easier? |
I guess if nobody else steps up I'll just merge this later today and be prepared to take the blame if something goes wrong (though I can't see what would) 😆 |
Allow custom fixture names for fixtures
👍 |
When defining a fixture in the same module as where it is used, the
function argument shadows the fixture name, which a) annoys pylint and
b) can lead to bugs where you forget pull a fixture into a test method.
This allows one to define fixtures with a custom name override,
bypassing that problem.
I felt a little weird about thanking myself in the changelog.