Convert Python 3 ResourceWarnings into exception

Piotr Dobrogost p at
Wed Jul 30 15:24:59 CEST 2014


Recently A. Jesse Jiryu Davis asked at Stackoverflow
( if there is "a way to force a
Python 3 unittest to fail, rather than simply print a warning to stderr, if
it causes any ResourceWarning?" Daniel Harding, in the accepted answer,
states it's not possible.

Is it really the case?

For sake of context, here I believe is the place, where
PyErr_WriteUnraisable is being called in this case –

More information about the Python-list mailing list