Skip to content

Commit

Permalink
fix: Don't use mp.get_context("spawn") in test (#3753)
Browse files Browse the repository at this point in the history
This is deprecated it seems.
  • Loading branch information
paulgessinger authored Oct 18, 2024
1 parent 41066dc commit 3fadd3e
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 3fadd3e

Please sign in to comment.