You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using Pathos to do multiprocessing with objects containing lambda functions. When I run my tests, Pathos doesn't return although tests complete successfully:
(go-ast-go-EjGnZ3Kb-py3.8) ~/P/project (master|●3✚1…) $ pytest . 13:31:38
=============================================================================== test session starts ================================================================================
platform darwin -- Python 3.8.1+, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
rootdir: /Users/username/PycharmProjects/project
plugins: timeout-1.3.4
collected 14 items
tests/test_compare.py . [ 7%]
tests/test_continuous.py ... [ 28%]
tests/test_problem.py . [ 35%]
tests/test_solution.py . [ 42%]
tests/test_solver.py .. [ 57%]
tests/test_tsp.py ...... [100%]
================================================================================ 14 passed in 0.54s ================================================================================
^[[A
^CError in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/lib/python3.8/site-packages/multiprocess/util.py", line 277, in _run_finalizers
finalizer()
File "/lib/python3.8/site-packages/multiprocess/util.py", line 201, in __call__
res = self._callback(*self._args, **self._kwargs)
File "/lib/python3.8/site-packages/multiprocess/pool.py", line 689, in _terminate_pool
cls._help_stuff_finish(inqueue, task_handler, len(pool))
File "/lib/python3.8/site-packages/multiprocess/pool.py", line 674, in _help_stuff_finish
inqueue._rlock.acquire()
KeyboardInterrupt
Similar problem occured when I had some faulty code and it raised exception in one of the subprocesses - the whole program didn't terminate, and hanged until given a KeyboardInterrupt.
OS: macOS 10.14.6
The text was updated successfully, but these errors were encountered:
ikamensh
changed the title
Hangs after tests complete
Hangs after pytest tests complete
Feb 14, 2020
I think pytest doesn't play well with mutiprocessing (and hence pathos). Specifically I've been rolling my own tests in test.__main__ and not using pytest since reading the pytest docs a way back, and seeing notes about issues with multiprocessing.
I am on the fence about putting pytest support in "won't-fix", so I'll leave this open for now.
Hi,
I am using Pathos to do multiprocessing with objects containing lambda functions. When I run my tests, Pathos doesn't return although tests complete successfully:
Similar problem occured when I had some faulty code and it raised exception in one of the subprocesses - the whole program didn't terminate, and hanged until given a KeyboardInterrupt.
OS: macOS 10.14.6
The text was updated successfully, but these errors were encountered: