Skip to content

Commit

Permalink
fix: Don't use mp.get_context("spawn") in test (acts-project#3753)
Browse files Browse the repository at this point in the history
This is deprecated it seems.
  • Loading branch information
paulgessinger authored and Rosie-Hasan committed Nov 13, 2024
1 parent 053c8b1 commit 297f5f5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Examples/Python/tests/test_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 297f5f5

Please sign in to comment.