Improve error handling around yieldctx fixtures which do not yield a value#7083
Merged
bluetech merged 4 commits intopytest-dev:masterfrom Apr 15, 2020
Merged
Conversation
bluetech
requested changes
Apr 14, 2020
Member
bluetech
left a comment
There was a problem hiding this comment.
Thanks @symonk, I left some comments.
I think ValueError is fine, at least it seems to be used in other similar situation, from what I can see.
I added a Fixes #7061 to the PR description so that it will auto-close it when merged.
Member
Author
|
@bluetech appreciate your feed back once again, will do this after work this evening |
Member
Author
|
not sure where to go on these (ubuntu-pyp3): |
Member
Seems unrelated. Some tests are flaky... |
Member
Author
|
Thanks for your time @bluetech, I really appreciate your patience and I apologize if I am testing it with many discussions and tweaks/changes. This should be completed now (I hope) |
bluetech
approved these changes
Apr 14, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7061.
Good afternoon, thanks for your time. I am opening this PR as a 'work in progress'. I have implemented some behaviour that checks a yielding fixture actually yields a value with a test to cover it.
What I am not so sure on is what to do exactly when that occurs; right now I am raising a ValueError, not entirely sure that is the way to go and secondly what exactly pytest should do in that instance. Fixture(s) are so core to pytest so being so new to the code makes me a little nervous. Regression tests are passing atleast...