bpo-33833: Fix ProactorSocketTransport AssertionError by twisteroidambassador · Pull Request #7632 · python/cpython
Can we have a unittest for this?
It may require a bit of advanced Mock() magic. The preconditions are somewhat complex, and the exception is raised in a done_callback, so usually it just goes to the log and nowhere else.
It may require a bit of advanced Mock() magic. The preconditions are somewhat complex
Yeah, let's not add more complex mock tests. But if it's possible to recreate the preconditions with a functional test it would be enormously helpful.
and the exception is raised in a done_callback, so usually it just goes to the log and nowhere else.
We have assertLogs or something like that :)
Now we have a unit test and blurb.
(I am reminded of this joke when writing the test:
Patient: "Doctor, it hurts when I do this."
Doctor: "Don't do that.")
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