<div dir="ltr">A gist showing the test hanging is here:<div><a href="https://gist.github.com/andyfaff/a5bb1cbcc1828edde0bc7c1f67666f1c">https://gist.github.com/andyfaff/a5bb1cbcc1828edde0bc7c1f67666f1c</a><br></div><div><br></div><div>Note that if the Pool start method is set to 'fork' (non default on macOS and not recommended) then the test runs without any issues.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, 11 Apr 2020 at 14:23, Andrew Nelson <<a href="mailto:andyfaff@gmail.com">andyfaff@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Dear pytest-dev,<br>on scipy we typically run the test suite using a test script collecting a series of test arguments, then supplies them to `pytest.main()`.<br><br><a href="https://github.com/scipy/scipy/blob/master/runtests.py#L307" target="_blank">https://github.com/scipy/scipy/blob/master/runtests.py#L307</a><div>then</div><div><a href="https://github.com/scipy/scipy/blob/master/scipy/_lib/_testutils.py#L67" target="_blank">https://github.com/scipy/scipy/blob/master/scipy/_lib/_testutils.py#L67</a><br></div><div><br>I'm finding that all the tests that involve multiprocessing fail, e.g.<br><br>```<br>def test_pool():<br> with Pool(2) as p:<br> p.map(math.sin, [1,2,3, 4])<br>```<br><br>This is on macOS+Python3.8 that uses 'spawn' as a start method. If I run the tests directly using pytest there aren't any issues.</div><div>Are there any known issues using `pytest.main` with multiprocessing?</div><div><br></div><div>Andrew</div></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">_____________________________________<br>Dr. Andrew Nelson<br><br><br>_____________________________________</div>