pytest segfault, not with -v
Dan Stromberg
drsalists at gmail.com
Sat Nov 20 11:23:21 EST 2021
On Fri, Nov 19, 2021 at 9:49 AM Marco Sulla <Marco.Sulla.Python at gmail.com>
wrote:
> I have a battery of tests done with pytest. My tests break with a
> segfault if I run them normally. If I run them using pytest -v, the
> segfault does not happen.
>
> What could cause this quantical phenomenon?
>
Pure python code shouldn't do this, unless you're using ctypes or similar
(which arguably isn't pure python).
But C extension modules sure can. See:
https://stromberg.dnsalias.org/~strombrg/checking-early.html . It uses
Fortran to make its point, but the same thing very much applies to C.
BTW, if you're using C extension modules, the troublesome one doesn't
necessarily have to be one you wrote. It could be a dependency created by
someone else too.
More information about the Python-list
mailing list