{{ message }}
bpo-36829: Add test.support.catch_unraisable_exception()#13490
Merged
vstinner merged 3 commits intoMay 22, 2019
Merged
Conversation
* Copy test_exceptions.test_unraisable() to test_sys.UnraisableHookTest(). * test_exceptions.test_unraisable() uses catch_unraisable_exception(); simplify the test. test_sys now checks the exact output. * Use catch_unraisable_exception() in test_coroutines, test_exceptions, test_generators.
Member
Author
|
I chose to leave test_io unchanged on purpose: I have a local branch which fix also https://bugs.python.org/issue36918 in Lib/_pyio.py and use this new catch_unraisable_exception() function. Once this PR will be merged, I will write a second PR based on it. |
Sorry, something went wrong.
vstinner
commented
May 22, 2019
graingert
reviewed
May 22, 2019
Avoid the need for try/finally: __exit__ clears unraisable to break the reference cycle.
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
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.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.
test_sys.UnraisableHookTest().
simplify the test. test_sys now checks the exact output.
test_exceptions, test_generators.
https://bugs.python.org/issue36829