@@ -1032,6 +1032,7 @@ def test_parallel_with_unpicklable_functions_in_args(
10321032
10331033INTERACTIVE_DEFINED_FUNCTION_AND_CLASS_SCRIPT_CONTENT = """\
10341034 import sys
1035+ import faulthandler
10351036# Make sure that joblib is importable in the subprocess launching this
10361037# script. This is needed in case we run the tests from the joblib root
10371038# folder without having installed joblib
@@ -1056,6 +1057,9 @@ def square(x, ignored=None, ignored2=None):
10561057# Here, we do not need the `if __name__ == "__main__":` safeguard when
10571058# using the default `loky` backend (even on Windows).
10581059
1060+ # To make debugging easier
1061+ faulthandler.dump_traceback_later(30, exit=True)
1062+
10591063# The following baroque function call is meant to check that joblib
10601064# introspection rightfully uses cloudpickle instead of the (faster) pickle
10611065# 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):
10781082 # filesystem script.
10791083 script = tmpdir .join ('joblib_interactively_defined_function.py' )
10801084 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+ )
10841090
10851091
10861092INTERACTIVELY_DEFINED_SUBCLASS_WITH_METHOD_SCRIPT_CONTENT = """\
0 commit comments