You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BUG: Add a lock to assert_equal and other testing functions
This lock prevents unsafe warning filter manipulations during testing
if downstream packages do parallel testing.
Warning filtering is generally not threadsafe in python, this is also
true for `catch_warnings` or `suppress_warinings`. In NumPy 1.12
however, `assert_equal` and the array comparison asserts, use this
to filter out some comparison warnings. Since removing this filter
may also affect downstream projects and skimage (and possibly more)
do parallel manual parallel testing using `assert_equal`, a quick fix
seems to be to lock the less obvious threading trap. Ideally (in
master this is the case), there should simply not be warning filter
logic in the assert functions themself.
While probably not perfectly safe in principle, it is sufficient
in the case of skimage and probably most testing scenarios and the
chance of deadlocks seems very unlikely.
Closesgh-8413
0 commit comments