-
-
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
weird setupstate behaviour for yield tests #16
Comments
Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42): To be more precise and make sure i understand: collecting yield-based tests needs setupstate and when further items are collected, the state may be teared down and thus when the yield-tests actually run, the setupstate needs to be recreated a second time. Right? Now i wonder: why can the setup state not be created a second time? feel free to also point me to the repo and exact code you are talking about. |
Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt): im not sure what/how to fix, the problem is that yield tests need a setupstate in collection, |
Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt): finally had a good idea for a minimal case |
Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt): its still an isse, moinmoin has a hack in place to work around |
Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt): basically it will stay an issue till we provide a different way to have partial failures without stopping the complete test |
Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42): I am not sure if we should pursue any improvements to yield-based tests. In any case, i don't know what the actual idea here is for improving yield-based setup. Doing larger scale refactorings just for better yield support does not seem worthwhile to me. It might be acceptable if better comes out as a side effect and the refactoring is useful for other reasons. If nothing happens on this issue for a couple of months i'd like to close it. |
Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt): i hit yet another proejct where this prevents pytest usage the suggested solution is to drop collecting yield items, and make reporting prettier later |
Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt): addresses #16 - replace Generator with pytest_pyfunc_interpret_result |
however in order to do so yield tests are currently less detailed but as bonus they now support fixtures like normal tests the Generator object was completely removed and Function was aliased to Generatot
however in order to do so yield tests are currently less detailed but as bonus they now support fixtures like normal tests the Generator object was completely removed and Function was aliased to Generatot
Closes #16 Closes pytest-dev#1324
finally addressed in #1714 |
Add CircleCI configuration to run tests on Python 3 + fix several Python 3 issues
Originally reported by: Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt)
yield tests need a setupstate to be generated, however running the suite will destroy it when running a item with a new parent, then the setupstate will be recreated
this is what messes up the moin suite on pytest2.0
i still have to figure a reasonable minimized test
The text was updated successfully, but these errors were encountered: