From 3fadd3eb572b08b074db49480a040b77675780b1 Mon Sep 17 00:00:00 2001 From: Paul Gessinger Date: Fri, 18 Oct 2024 12:57:16 +0200 Subject: [PATCH] fix: Don't use `mp.get_context("spawn")` in test (#3753) This is deprecated it seems. --- Examples/Python/tests/test_reader.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Examples/Python/tests/test_reader.py b/Examples/Python/tests/test_reader.py index 3d458cb8009..b83b1317cc8 100644 --- a/Examples/Python/tests/test_reader.py +++ b/Examples/Python/tests/test_reader.py @@ -290,8 +290,11 @@ def test_edm4hep_simhit_particle_reader(tmp_path): tmp_file = str(tmp_path / "output_edm4hep.root") odd_xml_file = str(getOpenDataDetectorDirectory() / "xml" / "OpenDataDetector.xml") - with multiprocessing.get_context("spawn").Pool() as pool: - pool.apply(generate_input_test_edm4hep_simhit_reader, (odd_xml_file, tmp_file)) + p = multiprocessing.Process( + target=generate_input_test_edm4hep_simhit_reader, args=(odd_xml_file, tmp_file) + ) + p.start() + p.join() assert os.path.exists(tmp_file)