@@ -1032,6 +1032,7 @@ def test_parallel_with_unpicklable_functions_in_args(
1032
1032
1033
1033
INTERACTIVE_DEFINED_FUNCTION_AND_CLASS_SCRIPT_CONTENT = """\
1034
1034
import sys
1035
+ import faulthandler
1035
1036
# Make sure that joblib is importable in the subprocess launching this
1036
1037
# script. This is needed in case we run the tests from the joblib root
1037
1038
# folder without having installed joblib
@@ -1056,6 +1057,9 @@ def square(x, ignored=None, ignored2=None):
1056
1057
# Here, we do not need the `if __name__ == "__main__":` safeguard when
1057
1058
# using the default `loky` backend (even on Windows).
1058
1059
1060
+ # To make debugging easier
1061
+ faulthandler.dump_traceback_later(30, exit=True)
1062
+
1059
1063
# The following baroque function call is meant to check that joblib
1060
1064
# introspection rightfully uses cloudpickle instead of the (faster) pickle
1061
1065
# module of the standard library when necessary. In particular cloudpickle is
@@ -1078,9 +1082,11 @@ def test_parallel_with_interactively_defined_functions_default_backend(tmpdir):
1078
1082
# filesystem script.
1079
1083
script = tmpdir .join ('joblib_interactively_defined_function.py' )
1080
1084
script .write (INTERACTIVE_DEFINED_FUNCTION_AND_CLASS_SCRIPT_CONTENT )
1081
- check_subprocess_call ([sys .executable , script .strpath ],
1082
- stdout_regex = r'\[0, 1, 4, 9, 16\]' ,
1083
- timeout = 5 )
1085
+ check_subprocess_call (
1086
+ [sys .executable , script .strpath ],
1087
+ stdout_regex = r'\[0, 1, 4, 9, 16\]' ,
1088
+ timeout = None , # rely on faulthandler to kill the process
1089
+ )
1084
1090
1085
1091
1086
1092
INTERACTIVELY_DEFINED_SUBCLASS_WITH_METHOD_SCRIPT_CONTENT = """\
0 commit comments