Convert Python 3 ResourceWarnings into exception
wxjmfauth at gmail.com
wxjmfauth at gmail.com
Wed Jul 30 10:08:57 EDT 2014
Le mercredi 30 juillet 2014 15:24:59 UTC+2, Piotr Dobrogost a écrit :
> Hi!
>
>
>
> Recently A. Jesse Jiryu Davis asked at Stackoverflow
>
> (http://stackoverflow.com/q/24717027/95735) 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 -
>
> http://hg.python.org/cpython/annotate/c0e311e010fc/Modules/socketmodule.c#l3857
I can let Python 3 crash with any valid string I wish.
I can let Python 3 fails with any *valid* string I wish.
jmf
PS I know why.
More information about the Python-list
mailing list