Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_multiprocessing_pool causes deadlock with Python 3.8a4 #295

Open
frenzymadness opened this issue May 16, 2019 · 15 comments
Open

test_multiprocessing_pool causes deadlock with Python 3.8a4 #295

frenzymadness opened this issue May 16, 2019 · 15 comments
Labels
python3.8 Python 3.8 integration problem

Comments

@frenzymadness
Copy link

Hello.

Tests test_multiprocessing_pool, test_multiprocessing_pool_terminate and test_multiprocessing_pool_close cause deadlock with Python 3.8a4.

I don't know whether it's related to #294 or not and I haven't had time to investigate it more.

@ionelmc
Copy link
Member

ionelmc commented May 16, 2019

Does the deadlock still happen with the master of pytest-cov?

@frenzymadness
Copy link
Author

I am trying to find where the problem comes from but I am not successful. I'm working with the latest master.

The strange thing is that it works when I run it in a virtual environment but not when I use system packages.

With virtual environment:

(venv) [root@ccce9a823823 pytest-cov]# python3.8 -m pytest -vv -k test_multiprocessing tests/
==================================================== test session starts ====================================================
platform linux -- Python 3.8.0a4, pytest-4.5.0, py-1.8.0, pluggy-0.11.0 -- /pytest-cov/venv/bin/python
cachedir: .pytest_cache
rootdir: /pytest-cov, inifile: setup.cfg
plugins: xdist-1.28.0, forked-1.0.2, cov-2.7.1
collected 119 items / 113 deselected / 6 selected                                                                           

tests/test_pytest_cov.py::test_multiprocessing_pool PASSED                                                            [ 16%]
tests/test_pytest_cov.py::test_multiprocessing_pool_terminate PASSED                                                  [ 33%]
tests/test_pytest_cov.py::test_multiprocessing_pool_close PASSED                                                      [ 50%]
tests/test_pytest_cov.py::test_multiprocessing_process PASSED                                                         [ 66%]
tests/test_pytest_cov.py::test_multiprocessing_process_no_source PASSED                                               [ 83%]
tests/test_pytest_cov.py::test_multiprocessing_process_with_terminate PASSED                                          [100%]

========================================= 6 passed, 113 deselected in 15.56 seconds =========================================

without virtual environment:

[root@ccce9a823823 pytest-cov]# python3.8 -m pytest -vv -k test_multiprocessing tests/
==================================================== test session starts ====================================================
platform linux -- Python 3.8.0a4, pytest-4.4.1, py-1.8.0, pluggy-0.11.0 -- /usr/bin/python3.8
cachedir: .pytest_cache
rootdir: /pytest-cov, inifile: setup.cfg
plugins: cov-2.7.1, xdist-1.28.0, forked-1.0.2
collected 119 items / 113 deselected / 6 selected                                                                           

tests/test_pytest_cov.py::test_multiprocessing_pool ^C

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
/usr/lib64/python3.8/subprocess.py:1708: KeyboardInterrupt

As you can see, the main difference is the version of pytest so I tried to run multiprocessing tests with the pytest version 4.4.1 inside virtual environment and it works. There are several different versions of packages so I'll try to investigate them more.

@frenzymadness
Copy link
Author

Ok, I am lost :( I've updated all packages on my system one by one via pip3 install --user to match versions installed in the virtual environment but it still works in the virtual environment but not outside.

Do you know about any difference between these two environments other than dependencies versions?

(venv) [root@ccce9a823823 pytest-cov]# pip freeze
apipkg==1.5
atomicwrites==1.3.0
attrs==19.1.0
coverage==5.0a5
execnet==1.6.0
fields==5.0.0
more-itertools==7.0.0
pluggy==0.11.0
process-tests==2.0.2
py==1.8.0
pytest==4.5.0
pytest-cov==2.7.1
pytest-forked==1.0.2
pytest-xdist==1.28.0
six==1.12.0
virtualenv==16.6.0
wcwidth==0.1.7

(venv) [root@ccce9a823823 pytest-cov]# deactivate
[root@ccce9a823823 pytest-cov]# pip3 freeze
apipkg==1.5
atomicwrites==1.3.0
attrs==19.1.0
coverage==5.0a5
distro==1.4.0
execnet==1.6.0
fields==5.0.0
gpg==1.12.0
more-itertools==7.0.0
pluggy==0.11.0
process-tests==2.0.2
py==1.8.0
pytest==4.5.0
pytest-cov==2.7.1
pytest-forked==1.0.2
pytest-xdist==1.28.0
python-dateutil==2.8.0
rpm==4.14.2.1
six==1.12.0
virtualenv==16.6.0
wcwidth==0.1.7

@ionelmc
Copy link
Member

ionelmc commented May 17, 2019

Well first off: don't trust pip :) it's buggy, been very buggy and it only lists possibly broken metadata - which is not the actual code installed.

To get at that stuck test:

  • disable output capturing (-s)
  • use strace/sysdig (something like strace -f -o /tmp/pytestcov.log)

About running the suite, you can use this neat lil trick to use tox with your custom python, eg:

TOXPYTHON=/tmp/py38/bin/python3.8 tox -e py37-t45-c45

Another thing: why coverage 5.0alpha? 4.5 is the stable version.

@frenzymadness
Copy link
Author

Unfortunately, I don't have that much time to dig into it deeper but I got something.

This is the output of strace command for all processes while the deadlocked one is still running.

==> pytestcov.log.2103 <==
13:39:16 ioctl(12, TCGETS, 0x7ffd0f697a40) = -1 ENOTTY (Inappropriate ioctl for device)
13:39:16 lseek(12, 0, SEEK_CUR)         = -1 ESPIPE (Illegal seek)
13:39:16 pipe2([13, 14], O_CLOEXEC)     = 0
13:39:16 clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f5bf6158990) = 2105
13:39:16 close(14)                      = 0
13:39:16 close(11)                      = 0
13:39:16 read(13, "", 50000)            = 0
13:39:16 close(13)                      = 0
13:39:16 close(12)                      = 0
13:39:16 wait4(2105, 
==> pytestcov.log.2104 <==
13:39:16 fstat(3, {st_mode=S_IFREG|0644, st_size=339912, ...}) = 0
13:39:16 mmap(NULL, 339912, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f2d8f7fc000
13:39:16 close(3)                       = 0
13:39:16 uname({sysname="Linux", nodename="14ceb8102119", ...}) = 0
13:39:16 fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
13:39:16 write(1, "x86_64\n", 7)        = 7
13:39:16 close(1)                       = 0
13:39:16 close(2)                       = 0
13:39:16 exit_group(0)                  = ?
13:39:16 +++ exited with 0 +++

==> pytestcov.log.2105 <==
13:39:17 wait4(2109, 0x7ffdfd4183c4, WNOHANG, NULL) = 0
13:39:17 kill(2109, SIGTERM)            = 0
13:39:17 getpid()                       = 2105
13:39:17 wait4(2107, 0x7ffdfd418444, WNOHANG, NULL) = 0
13:39:17 getpid()                       = 2105
13:39:17 wait4(2107, 0x7ffdfd418074, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
13:39:17 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2109, si_uid=0, si_status=0, si_utime=1, si_stime=0} ---
13:39:17 wait4(2107, 0x7ffdfd418074, 0, NULL) = ? ERESTARTSYS (To be restarted if SA_RESTART is set)
13:39:17 --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=2108, si_uid=0, si_status=0, si_utime=1, si_stime=0} ---
13:39:17 wait4(2107, 
==> pytestcov.log.2106 <==
13:39:17 fstat(3, {st_mode=S_IFREG|0644, st_size=339912, ...}) = 0
13:39:17 mmap(NULL, 339912, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fce388b4000
13:39:17 close(3)                       = 0
13:39:17 uname({sysname="Linux", nodename="14ceb8102119", ...}) = 0
13:39:17 fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
13:39:17 write(1, "x86_64\n", 7)        = 7
13:39:17 close(1)                       = 0
13:39:17 close(2)                       = 0
13:39:17 exit_group(0)                  = ?
13:39:17 +++ exited with 0 +++

==> pytestcov.log.2107 <==
13:39:17 stat("/usr/lib/python3.8/site-packages/_pytest/main.py", {st_mode=S_IFREG|0644, st_size=26632, ...}) = 0
13:39:17 stat("/usr/lib/python3.8/site-packages/_pytest/main.py", {st_mode=S_IFREG|0644, st_size=26632, ...}) = 0
13:39:17 stat("/usr/lib/python3.8/site-packages/_pytest/main.py", {st_mode=S_IFREG|0644, st_size=26632, ...}) = 0
13:39:17 stat("/usr/lib/python3.8/site-packages/_pytest/main.py", {st_mode=S_IFREG|0644, st_size=26632, ...}) = 0
13:39:17 --- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=2105, si_uid=0} ---
13:39:17 getpid()                       = 2107
13:39:17 rt_sigreturn({mask=[]})        = 0
13:39:17 close(10)                      = 0
13:39:17 close(11)                      = 0
13:39:17 futex(0x7f8404d51000, FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY
==> pytestcov.log.2108 <==
13:39:17 write(9, "  File \"/usr/lib64/python3.8/mul"..., 100) = 100
13:39:17 write(9, "", 0)                = 0
13:39:17 write(9, "  File \"/usr/lib64/python3.8/mul"..., 131) = 131
13:39:17 write(9, "", 0)                = 0
13:39:17 write(9, "  File \"/usr/local/lib/python3.8"..., 163) = 163
13:39:17 write(9, "", 0)                = 0
13:39:17 write(9, "TypeError: _signal_cleanup_handl"..., 88) = 88
13:39:17 write(9, "", 0)                = 0
13:39:17 exit_group(0)                  = ?
13:39:17 +++ exited with 0 +++

==> pytestcov.log.2109 <==
13:39:17 write(9, "  File \"/usr/lib64/python3.8/mul"..., 100) = 100
13:39:17 write(9, "", 0)                = 0
13:39:17 write(9, "  File \"/usr/lib64/python3.8/mul"..., 131) = 131
13:39:17 write(9, "", 0)                = 0
13:39:17 write(9, "  File \"/usr/local/lib/python3.8"..., 163) = 163
13:39:17 write(9, "", 0)                = 0
13:39:17 write(9, "TypeError: _signal_cleanup_handl"..., 88) = 88
13:39:17 write(9, "", 0)                = 0
13:39:17 exit_group(0)                  = ?
13:39:17 +++ exited with 0 +++

==> pytestcov.log.2110 <==
13:39:17 mprotect(0x7f8401997000, 4096, PROT_READ) = 0
13:39:17 munmap(0x7f8401999000, 13880)  = 0
13:39:17 futex(0x7f8404d53908, FUTEX_WAKE_PRIVATE, 1) = 1
13:39:17 futex(0x7f84019981c0, FUTEX_WAKE_PRIVATE, 2147483647) = 0
13:39:17 futex(0x7f8404d53930, FUTEX_WAKE_PRIVATE, 1) = 0
13:39:17 futex(0x7f8404d53930, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
13:39:17 futex(0x7f8404d53930, FUTEX_WAKE_PRIVATE, 1) = 0
13:39:17 madvise(0x7f840299f000, 8368128, MADV_DONTNEED) = 0
13:39:17 exit(0)                        = ?
13:39:17 +++ exited with 

Process 2103 (the main one) is waiting for process 2105 which is waiting for process 2107.

Processes command line:

# cat /proc/2103/cmdline 
python3-mpytest-ktest_multiprocessingtests/
# cat /proc/2105/cmdline 
/usr/bin/python3-mpytest--basetemp=/tmp/pytest-of-root/pytest-7/test_multiprocessing_pool0/runpytest-0-v--cov=/tmp/pytest-of-root/pytest-7/test_multiprocessing_pool0--cov-report=term-missing/tmp/pytest-of-root/pytest-7/test_multiprocessing_pool0/test_multiprocessing_pool.py--basetemp=/tmp/pytest-of-root/pytest-7/basetemp
# cat /proc/2107/cmdline 
/usr/bin/python3-mpytest--basetemp=/tmp/pytest-of-root/pytest-7/test_multiprocessing_pool0/runpytest-0-v--cov=/tmp/pytest-of-root/pytest-7/test_multiprocessing_pool0--cov-report=term-missing/tmp/pytest-of-root/pytest-7/test_multiprocessing_pool0/test_multiprocessing_pool.py--basetemp=/tmp/pytest-of-root/pytest-7/basetemp

When I kill the process 2107 another one appears with the same last syscal and then process 2105 is waiting for them.

By the last syscal I mean:

futex(0x7f84042df000, FUTEX_WAIT_BITSET|FUTEX_CLOCK_REALTIME, 0, NULL, FUTEX_BITSET_MATCH_ANY

That's all I have now.

By the way, coverage-5.0a5 is installed automatically when I run python setup.py install in pytest-cov directory:

# python3 --version
Python 3.8.0a4
# python3 -m venv cov_venv
# source cov_venv/bin/activate
(cov_venv) # python setup.py install
...
Best match: coverage 5.0a5
Processing coverage-5.0a5.tar.gz
...

@frenzymadness
Copy link
Author

One more thing that might be important is that coverage is in virtual environment installed without C extension, because I am testing it in a docker container without gcc installed. I'll try later whether it makes any difference.

Best match: coverage 5.0a5
Processing coverage-5.0a5.tar.gz
Writing /tmp/easy_install-u04wekjz/coverage-5.0a5/setup.cfg
Running coverage-5.0a5/setup.py -q bdist_egg --dist-dir /tmp/easy_install-u04wekjz/coverage-5.0a5/egg-dist-tmp-3l2uljx_
warning: no previously-included files found matching 'ci/appveyor.token'
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching 'tests/eggsrc/build'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
unable to execute 'gcc': No such file or directory
**
** Couldn't install with extension module, trying without it...
** BuildFailed: command 'gcc' failed with exit status 1
**
warning: no previously-included files found matching 'ci/appveyor.token'
no previously-included directories found matching 'doc/_build'
no previously-included directories found matching 'tests/eggsrc/build'
warning: no previously-included files matching '*.py[co]' found anywhere in distribution
creating /pytest-cov/cov_venv/lib/python3.8/site-packages/coverage-5.0a5-py3.8.egg
Extracting coverage-5.0a5-py3.8.egg to /pytest-cov/cov_venv/lib/python3.8/site-packages
Adding coverage 5.0a5 to easy-install.pth file
Installing coverage script to /pytest-cov/cov_venv/bin
Installing coverage-3.8 script to /pytest-cov/cov_venv/bin
Installing coverage3 script to /pytest-cov/cov_venv/bin

@ionelmc
Copy link
Member

ionelmc commented May 20, 2019

It's a bit messy ... don't you have pip there? Use pip install . instead of setup.py install.

Since you don't have a compiler I suppose you also use a python3.8 image from somewhere?

@frenzymadness
Copy link
Author

We discovered this problem while rebuilding RPM packages for Fedora in COPR where my Python 3.8a4 comes from. https://copr.fedorainfracloud.org/coprs/g/python/python3.8/

@frenzymadness
Copy link
Author

Ok, you can forget what I said before because it seems that the deadlock problem is not deterministic and you have to run multiprocessing tests multiple times to actually discover it. With this fact in mind, it seems that the problem is in the coverage itself because I can reproduce it with coverage version 4.5.3 but I cannot reproduce it with version 5.0a5.

The first virtual environment with coverage 5.0a5

# pip freeze
apipkg==1.5
atomicwrites==1.3.0
attrs==19.1.0
coverage==5.0a5
execnet==1.6.0
fields==5.0.0
more-itertools==7.0.0
pluggy==0.11.0
process-tests==2.0.2
py==1.8.0
pytest==4.5.0
pytest-cov==2.7.1
pytest-forked==1.0.2
pytest-xdist==1.28.0
six==1.12.0
virtualenv==16.6.0
wcwidth==0.1.7

The second virtual environment with coverage 4.5.3

# pip freeze
apipkg==1.5
atomicwrites==1.3.0
attrs==19.1.0
coverage==4.5.3
execnet==1.6.0
fields==5.0.0
more-itertools==7.0.0
pluggy==0.11.0
process-tests==2.0.2
py==1.8.0
pytest==4.5.0
pytest-cov==2.7.1
pytest-forked==1.0.2
pytest-xdist==1.28.0
six==1.12.0
virtualenv==16.6.0
wcwidth==0.1.7

I am able to run multiprocessing tests in the first virtual environment without any troubles over a hundred times. But in the second one, it needs only 10 runs to discover the issue. Especially it appears from 3 to 8 times in 10 runs.

I see in the tests source code that they are skipped on windows (because of broken multiprocessing) and on PyPy (because of deadlock problems) which might mean something.

The next step, at least from my point of view, is to create a simple reproducer which will prove that the problem is in coverage and help me report an issue.

@nedbat
Copy link
Collaborator

nedbat commented Jul 11, 2019

I think this fix to coverage.py fixes this problem: nedbat/coveragepy@72b21f1. It hasn't been released for 4.5.x yet.

@nedbat
Copy link
Collaborator

nedbat commented Aug 4, 2019

This is now fixed in coverage.py 4.5.4.

@blueyed
Copy link
Contributor

blueyed commented Aug 18, 2019

Hmm, still hangs for me?! (updated the c45 factor to use 4.5.4)

% tox -e py38-c45-t45 -- -k test_multiprocessing_pool -s -vv --fulltrace                                                                                                🐍? (pytest-cov@3.7.4)
GLOB sdist-make: …/Vcs/pytest-cov/setup.py
py38-c45-t45 inst-nodeps: /tmp/tox…/Vcs/pytest-cov/.tmp/package/1/pytest-cov-2.7.1.zip
py38-c45-t45 installed: apipkg==1.5,atomicwrites==1.3.0,attrs==19.1.0,colorama==0.4.1,coverage==4.5.4,execnet==1.7.0,fields==5.0.0,hunter==3.0.1,importlib-metadata==0.19,manhole==1.6.0,more-itertools==7.2.0,pluggy==0.12.0,process-tests==2.0.2,py==1.8.0,pytest==4.5.0,pytest-cov==2.7.1,pytest-forked==1.0.2,pytest-xdist==1.28.0,six==1.12.0,virtualenv==16.7.3,wcwidth==0.1.7,zipp==0.5.2
py38-c45-t45 run-test-pre: PYTHONHASHSEED='485937216'
py38-c45-t45 run-test: commands[0] | pytest -k test_multiprocessing_pool -s -vv --fulltrace
================================================================================================ test session starts ================================================================================================
platform linux -- Python 3.8.0b3+, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /tmp/tox…/Vcs/pytest-cov/py38-c45-t45/bin/python
cachedir: /tmp/tox…/Vcs/pytest-cov/py38-c45-t45/.pytest_cache
rootdir: …/Vcs/pytest-cov, inifile: setup.cfg, testpaths: tests
plugins: cov-2.7.1, xdist-1.28.0, forked-1.0.2
collected 119 items / 116 deselected / 3 selected

tests/test_pytest_cov.py::test_multiprocessing_pool running: /tmp/tox…/Vcs/pytest-cov/py38-c45-t45/bin/python -mpytest --basetemp=/tmp/pytest-of-user/pytest-154/test_multiprocessing_pool0/runpytest-0 -v --cov=/tmp/pytest-of-user/pytest-154/test_multiprocessing_pool0 --cov-report=term-missing /tmp/pytest-of-user/pytest-154/test_multiprocessing_pool0/test_multiprocessing_pool.py --basetemp=/tmp/pytest-of-user/pytest-154/basetemp
     in: /tmp/pytest-of-user/pytest-154/test_multiprocessing_pool0
^CERROR: got KeyboardInterrupt signal


========================================================================================== 116 deselected in 8.34 seconds ===========================================================================================
Traceback (most recent call last):
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/main.py", line 205, in wrap_session
    session.exitstatus = doit(config, session) or 0
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/main.py", line 249, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/hooks.py", line 289, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/manager.py", line 78, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/main.py", line 270, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/hooks.py", line 289, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/manager.py", line 78, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/runner.py", line 77, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/runner.py", line 92, in runtestprotocol
    reports.append(call_and_report(item, "call", log))
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/runner.py", line 172, in call_and_report
    call = call_runtest_hook(item, when, **kwds)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/runner.py", line 196, in call_runtest_hook
    return CallInfo.from_call(
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/runner.py", line 225, in from_call
    result = func()
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/runner.py", line 197, in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/hooks.py", line 289, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/manager.py", line 78, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/runner.py", line 122, in pytest_runtest_call
    item.runtest()
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/python.py", line 1467, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/hooks.py", line 289, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/manager.py", line 78, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/python.py", line 179, in pytest_pyfunc_call
    testfunction(**testargs)
  File "…/Vcs/pytest-cov/tests/test_pytest_cov.py", line 949, in test_multiprocessing_pool
    result = testdir.runpytest('-v',
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/pytester.py", line 913, in runpytest
    return self._runpytest_method(*args, **kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/pytester.py", line 1216, in runpytest_subprocess
    return self.run(*args, timeout=timeout)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/pytester.py", line 1132, in run
    ret = popen.wait()
  File "/home/user/.local/opt/python/lib/python3.8/subprocess.py", line 1050, in wait
    return self._wait(timeout=timeout)
  File "/home/user/.local/opt/python/lib/python3.8/subprocess.py", line 1775, in _wait
    (pid, sts) = self._try_wait(0)
  File "/home/user/.local/opt/python/lib/python3.8/subprocess.py", line 1733, in _try_wait
    (pid, sts) = os.waitpid(self.pid, wait_flags)
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/bin/pytest", line 10, in <module>
    sys.exit(main())
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/config/__init__.py", line 79, in main
    return config.hook.pytest_cmdline_main(config=config)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/hooks.py", line 289, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/manager.py", line 78, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/main.py", line 242, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/main.py", line 221, in wrap_session
    config.hook.pytest_keyboard_interrupt(excinfo=excinfo)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/hooks.py", line 289, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/manager.py", line 87, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/manager.py", line 78, in <lambda>
    self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/terminal.py", line 692, in pytest_keyboard_interrupt
    self._keyboardinterrupt_memo = excinfo.getrepr(funcargs=True)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/_code/code.py", line 551, in getrepr
    return fmt.repr_excinfo(self)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/_code/code.py", line 798, in repr_excinfo
    reprtraceback = self.repr_traceback(excinfo)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/_code/code.py", line 743, in repr_traceback
    reprentry = self.repr_traceback_entry(entry, einfo)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/_code/code.py", line 688, in repr_traceback_entry
    source = self._getentrysource(entry)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/_code/code.py", line 611, in _getentrysource
    source = entry.getsource(self.astcache)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/_code/code.py", line 219, in getsource
    source = self.frame.code.fullsource
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/_code/code.py", line 76, in fullsource
    full, _ = source.findsource(self.raw)
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/site-packages/_pytest/_code/source.py", line 241, in findsource
    sourcelines, lineno = inspect.findsource(obj)
  File "/home/user/.local/opt/python/lib/python3.8/inspect.py", line 780, in findsource
    file = getsourcefile(object)
  File "/home/user/.local/opt/python/lib/python3.8/inspect.py", line 705, in getsourcefile
    if os.path.exists(filename):
  File "/tmp/tox…/Vcs/pytest-cov/py38-c45-t45/lib/python3.8/genericpath.py", line 19, in exists
    os.stat(path)
KeyboardInterrupt

@frenzymadness
Copy link
Author

With Coverage 4.5.4, this is still an issue.

@nedbat
Copy link
Collaborator

nedbat commented Sep 9, 2019

I'm not sure what is different between our setups. When I run that environment (adjusted for the changes on master), the test fails, with a ton of output, finishing in 41 seconds:

 tox -e py38-coverage45-pytest45-xdist28 -- -k test_multiprocessing_pool -s -vv --fulltrace
GLOB sdist-make: /Users/ned/coverage/pytest-cov/setup.py
py38-coverage45-pytest45-xdist28 inst-nodeps: /Users/ned/coverage/pytest-cov/.tox/.tmp/package/1/pytest-cov-2.7.1.zip
py38-coverage45-pytest45-xdist28 installed: apipkg==1.5,atomicwrites==1.3.0,attrs==19.1.0,colorama==0.4.1,coverage==4.5.4,execnet==1.7.1,fields==5.0.0,hunter==3.0.1,importlib-metadata==0.20,manhole==1.6.0,more-itertools==7.2.0,pluggy==0.12.0,process-tests==2.0.2,py==1.8.0,pytest==4.5.0,pytest-cov==2.7.1,pytest-forked==1.0.2,pytest-xdist==1.28.0,six==1.12.0,virtualenv==16.7.5,wcwidth==0.1.7,zipp==0.6.0
py38-coverage45-pytest45-xdist28 run-test-pre: PYTHONHASHSEED='1812326824'
py38-coverage45-pytest45-xdist28 run-test: commands[0] | pytest -k test_multiprocessing_pool -s -vv --fulltrace
===================================================================== test session starts ======================================================================
platform darwin -- Python 3.8.0b4, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/bin/python
cachedir: .tox/py38-coverage45-pytest45-xdist28/.pytest_cache
rootdir: /Users/ned/coverage/pytest-cov, inifile: setup.cfg, testpaths: tests
plugins: forked-1.0.2, xdist-1.28.0, cov-2.7.1
collected 121 items / 118 deselected / 3 selected

tests/test_pytest_cov.py::test_multiprocessing_pool running: /Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/bin/python -mpytest --basetemp=/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0/runpytest-0 -v --cov=/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0 --cov-report=term-missing /private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0/test_multiprocessing_pool.py --basetemp=/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/basetemp
     in: /private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0
============================= test session starts ==============================
platform darwin -- Python 3.8.0b4, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/bin/python
cachedir: .pytest_cache
rootdir: /private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0
plugins: forked-1.0.2, xdist-1.28.0, cov-2.7.1
collecting ... collected 1 item

test_multiprocessing_pool.py::test_run_target PASSED                     [100%]

----------- coverage: platform darwin, python 3.8.0-beta-4 -----------
Name                           Stmts   Miss  Cover   Missing
------------------------------------------------------------
test_multiprocessing_pool.py     207    198     4%   4-201


========================== 1 passed in 11.15 seconds ===========================
FAILED
tests/test_pytest_cov.py::test_multiprocessing_pool_terminate running: /Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/bin/python -mpytest --basetemp=/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0/runpytest-0 -v --cov=/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0 --cov-report=term-missing /private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0/test_multiprocessing_pool_terminate.py --basetemp=/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/basetemp
     in: /private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0
============================= test session starts ==============================
platform darwin -- Python 3.8.0b4, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/bin/python
cachedir: .pytest_cache
rootdir: /private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0
plugins: forked-1.0.2, xdist-1.28.0, cov-2.7.1
collecting ... collected 1 item

test_multiprocessing_pool_terminate.py::test_run_target PASSED           [100%]

----------- coverage: platform darwin, python 3.8.0-beta-4 -----------
Name                                     Stmts   Miss  Cover   Missing
----------------------------------------------------------------------
test_multiprocessing_pool_terminate.py     209    198     5%   4-201


========================== 1 passed in 11.39 seconds ===========================
FAILED
tests/test_pytest_cov.py::test_multiprocessing_pool_close running: /Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/bin/python -mpytest --basetemp=/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_close0/runpytest-0 -v --cov=/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_close0 --cov-report=term-missing /private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_close0/test_multiprocessing_pool_close.py --basetemp=/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/basetemp
     in: /private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_close0
============================= test session starts ==============================
platform darwin -- Python 3.8.0b4, pytest-4.5.0, py-1.8.0, pluggy-0.12.0 -- /Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/bin/python
cachedir: .pytest_cache
rootdir: /private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_close0
plugins: forked-1.0.2, xdist-1.28.0, cov-2.7.1
collecting ... collected 1 item

test_multiprocessing_pool_close.py::test_run_target PASSED               [100%]

----------- coverage: platform darwin, python 3.8.0-beta-4 -----------
Name                                 Stmts   Miss  Cover   Missing
------------------------------------------------------------------
test_multiprocessing_pool_close.py     207      0   100%


========================== 1 passed in 13.27 seconds ===========================
PASSED

=========================================================================== FAILURES ===========================================================================
__________________________________________________________________ test_multiprocessing_pool ___________________________________________________________________

cls = <class '_pytest.runner.CallInfo'>, func = <function call_runtest_hook.<locals>.<lambda> at 0x105568a60>, when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @classmethod
    def from_call(cls, func, when, reraise=None):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        start = time()
        excinfo = None
        try:
>           result = func()

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/runner.py:225:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
    )

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/runner.py:197:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_HookCaller 'pytest_runtest_call'>, args = (), kwargs = {'item': <Function test_multiprocessing_pool>}, notincall = set()

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.spec and self.spec.argnames:
            notincall = (
                set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
            )
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call".format(tuple(notincall)),
                    stacklevel=2,
                )
>       return self._hookexec(self, self.get_hookimpls(), kwargs)

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/pluggy/hooks.py:289:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.config.PytestPluginManager object at 0x1041924c0>, hook = <_HookCaller 'pytest_runtest_call'>
methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/Users/ned/coverage/pytest-cov/.tox/py38-covera...cessing_pool>>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x1055205e0>>]
kwargs = {'item': <Function test_multiprocessing_pool>}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
>       return self._inner_hookexec(hook, methods, kwargs)

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/pluggy/manager.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

hook = <_HookCaller 'pytest_runtest_call'>
methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/Users/ned/coverage/pytest-cov/.tox/py38-covera...cessing_pool>>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x1055205e0>>]
kwargs = {'item': <Function test_multiprocessing_pool>}

>   self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
        methods,
        kwargs,
        firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
    )

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/pluggy/manager.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

item = <Function test_multiprocessing_pool>

    def pytest_runtest_call(item):
        _update_current_test_var(item, "call")
        sys.last_type, sys.last_value, sys.last_traceback = (None, None, None)
        try:
>           item.runtest()

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/runner.py:122:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Function test_multiprocessing_pool>

    def runtest(self):
        """ execute the underlying test function. """
>       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/python.py:1467:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_HookCaller 'pytest_pyfunc_call'>, args = (), kwargs = {'pyfuncitem': <Function test_multiprocessing_pool>}, notincall = set()

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.spec and self.spec.argnames:
            notincall = (
                set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
            )
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call".format(tuple(notincall)),
                    stacklevel=2,
                )
>       return self._hookexec(self, self.get_hookimpls(), kwargs)

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/pluggy/hooks.py:289:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.config.PytestPluginManager object at 0x1041924c0>, hook = <_HookCaller 'pytest_pyfunc_call'>
methods = [<HookImpl plugin_name='python', plugin=<module '_pytest.python' from '/Users/ned/coverage/pytest-cov/.tox/py38-covera...Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/skipping.py'>>]
kwargs = {'pyfuncitem': <Function test_multiprocessing_pool>}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
>       return self._inner_hookexec(hook, methods, kwargs)

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/pluggy/manager.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

hook = <_HookCaller 'pytest_pyfunc_call'>
methods = [<HookImpl plugin_name='python', plugin=<module '_pytest.python' from '/Users/ned/coverage/pytest-cov/.tox/py38-covera...Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/skipping.py'>>]
kwargs = {'pyfuncitem': <Function test_multiprocessing_pool>}

>   self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
        methods,
        kwargs,
        firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
    )

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/pluggy/manager.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

pyfuncitem = <Function test_multiprocessing_pool>

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        iscoroutinefunction = getattr(inspect, "iscoroutinefunction", None)
        if iscoroutinefunction is not None and iscoroutinefunction(testfunction):
            msg = "Coroutine functions are not natively supported and have been skipped.\n"
            msg += "You need to install a suitable plugin for your async framework, for example:\n"
            msg += "  - pytest-asyncio\n"
            msg += "  - pytest-trio\n"
            msg += "  - pytest-tornasync"
            warnings.warn(PytestUnhandledCoroutineWarning(msg.format(pyfuncitem.nodeid)))
            skip(msg="coroutine function and no async plugin installed (see warnings)")
        funcargs = pyfuncitem.funcargs
        testargs = {arg: funcargs[arg] for arg in pyfuncitem._fixtureinfo.argnames}
>       testfunction(**testargs)

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/python.py:179:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

testdir = <Testdir local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0')>

    @pytest.mark.skipif("sys.version_info[0] < 3", reason="no context manager api on Python 2")
    @pytest.mark.skipif('sys.platform == "win32"', reason="multiprocessing support is broken on Windows")
    @pytest.mark.skipif('platform.python_implementation() == "PyPy"', reason="often deadlocks on PyPy")
    def test_multiprocessing_pool(testdir):
        pytest.importorskip('multiprocessing.util')

        script = testdir.makepyfile('''
    import multiprocessing

    def target_fn(a):
        %sse:  # pragma: nocover
            return None

    def test_run_target():
        from pytest_cov.embed import cleanup_on_sigterm
        cleanup_on_sigterm()

        for i in range(33):
            with multiprocessing.Pool(3) as p:
                p.map(target_fn, [i * 3 + j for j in range(3)])
            p.join()
    ''' % ''.join('''if a == %r:
            return a
        el''' % i for i in range(99)))

        result = testdir.runpytest('-v',
                                   '--cov=%s' % script.dirpath(),
                                   '--cov-report=term-missing',
                                   script)

        assert "Doesn't seem to be a coverage.py data file" not in result.stdout.str()
        assert "Doesn't seem to be a coverage.py data file" not in result.stderr.str()
>       assert not testdir.tmpdir.listdir(".coverage.*")
E       AssertionError: assert not [local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0/.coverage.C02V31VQHTDD.local.57164.261071')]
E        +  where [local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0/.coverage.C02V31VQHTDD.local.57164.261071')] = <bound method LocalPath.listdir of local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0')>('.coverage.*')
E        +    where <bound method LocalPath.listdir of local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0')> = local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0').listdir
E        +      where local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0') = <Testdir local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool0')>.tmpdir

/Users/ned/coverage/pytest-cov/tests/test_pytest_cov.py:988: AssertionError
_____________________________________________________________ test_multiprocessing_pool_terminate ______________________________________________________________

cls = <class '_pytest.runner.CallInfo'>, func = <function call_runtest_hook.<locals>.<lambda> at 0x1057b2040>, when = 'call'
reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)

    @classmethod
    def from_call(cls, func, when, reraise=None):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        start = time()
        excinfo = None
        try:
>           result = func()

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/runner.py:225:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>       lambda: ihook(item=item, **kwds), when=when, reraise=reraise
    )

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/runner.py:197:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_HookCaller 'pytest_runtest_call'>, args = (), kwargs = {'item': <Function test_multiprocessing_pool_terminate>}, notincall = set()

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.spec and self.spec.argnames:
            notincall = (
                set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
            )
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call".format(tuple(notincall)),
                    stacklevel=2,
                )
>       return self._hookexec(self, self.get_hookimpls(), kwargs)

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/pluggy/hooks.py:289:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.config.PytestPluginManager object at 0x1041924c0>, hook = <_HookCaller 'pytest_runtest_call'>
methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/Users/ned/coverage/pytest-cov/.tox/py38-covera...ol_terminate>>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x1055205e0>>]
kwargs = {'item': <Function test_multiprocessing_pool_terminate>}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
>       return self._inner_hookexec(hook, methods, kwargs)

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/pluggy/manager.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

hook = <_HookCaller 'pytest_runtest_call'>
methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/Users/ned/coverage/pytest-cov/.tox/py38-covera...ol_terminate>>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x1055205e0>>]
kwargs = {'item': <Function test_multiprocessing_pool_terminate>}

>   self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
        methods,
        kwargs,
        firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
    )

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/pluggy/manager.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

item = <Function test_multiprocessing_pool_terminate>

    def pytest_runtest_call(item):
        _update_current_test_var(item, "call")
        sys.last_type, sys.last_value, sys.last_traceback = (None, None, None)
        try:
>           item.runtest()

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/runner.py:122:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <Function test_multiprocessing_pool_terminate>

    def runtest(self):
        """ execute the underlying test function. """
>       self.ihook.pytest_pyfunc_call(pyfuncitem=self)

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/python.py:1467:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_HookCaller 'pytest_pyfunc_call'>, args = (), kwargs = {'pyfuncitem': <Function test_multiprocessing_pool_terminate>}, notincall = set()

    def __call__(self, *args, **kwargs):
        if args:
            raise TypeError("hook calling supports only keyword arguments")
        assert not self.is_historic()
        if self.spec and self.spec.argnames:
            notincall = (
                set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
            )
            if notincall:
                warnings.warn(
                    "Argument(s) {} which are declared in the hookspec "
                    "can not be found in this hook call".format(tuple(notincall)),
                    stacklevel=2,
                )
>       return self._hookexec(self, self.get_hookimpls(), kwargs)

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/pluggy/hooks.py:289:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.config.PytestPluginManager object at 0x1041924c0>, hook = <_HookCaller 'pytest_pyfunc_call'>
methods = [<HookImpl plugin_name='python', plugin=<module '_pytest.python' from '/Users/ned/coverage/pytest-cov/.tox/py38-covera...Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/skipping.py'>>]
kwargs = {'pyfuncitem': <Function test_multiprocessing_pool_terminate>}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
>       return self._inner_hookexec(hook, methods, kwargs)

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/pluggy/manager.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

hook = <_HookCaller 'pytest_pyfunc_call'>
methods = [<HookImpl plugin_name='python', plugin=<module '_pytest.python' from '/Users/ned/coverage/pytest-cov/.tox/py38-covera...Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/skipping.py'>>]
kwargs = {'pyfuncitem': <Function test_multiprocessing_pool_terminate>}

>   self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
        methods,
        kwargs,
        firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
    )

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/pluggy/manager.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

pyfuncitem = <Function test_multiprocessing_pool_terminate>

    @hookimpl(trylast=True)
    def pytest_pyfunc_call(pyfuncitem):
        testfunction = pyfuncitem.obj
        iscoroutinefunction = getattr(inspect, "iscoroutinefunction", None)
        if iscoroutinefunction is not None and iscoroutinefunction(testfunction):
            msg = "Coroutine functions are not natively supported and have been skipped.\n"
            msg += "You need to install a suitable plugin for your async framework, for example:\n"
            msg += "  - pytest-asyncio\n"
            msg += "  - pytest-trio\n"
            msg += "  - pytest-tornasync"
            warnings.warn(PytestUnhandledCoroutineWarning(msg.format(pyfuncitem.nodeid)))
            skip(msg="coroutine function and no async plugin installed (see warnings)")
        funcargs = pyfuncitem.funcargs
        testargs = {arg: funcargs[arg] for arg in pyfuncitem._fixtureinfo.argnames}
>       testfunction(**testargs)

/Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/lib/python3.8/site-packages/_pytest/python.py:179:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

testdir = <Testdir local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0')>

    @pytest.mark.skipif('sys.platform == "win32"', reason="multiprocessing support is broken on Windows")
    @pytest.mark.skipif('platform.python_implementation() == "PyPy"', reason="often deadlocks on PyPy")
    def test_multiprocessing_pool_terminate(testdir):
        pytest.importorskip('multiprocessing.util')

        script = testdir.makepyfile('''
    import multiprocessing

    def target_fn(a):
        %sse:  # pragma: nocover
            return None

    def test_run_target():
        from pytest_cov.embed import cleanup_on_sigterm
        cleanup_on_sigterm()

        for i in range(33):
            p = multiprocessing.Pool(3)
            try:
                p.map(target_fn, [i * 3 + j for j in range(3)])
            finally:
                p.terminate()
                p.join()
    ''' % ''.join('''if a == %r:
            return a
        el''' % i for i in range(99)))

        result = testdir.runpytest('-v',
                                   '--cov=%s' % script.dirpath(),
                                   '--cov-report=term-missing',
                                   script)

        assert "Doesn't seem to be a coverage.py data file" not in result.stdout.str()
        assert "Doesn't seem to be a coverage.py data file" not in result.stderr.str()
>       assert not testdir.tmpdir.listdir(".coverage.*")
E       AssertionError: assert not [local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0/.coverage.C02V31VQHTDD.local.57377.856336')]
E        +  where [local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0/.coverage.C02V31VQHTDD.local.57377.856336')] = <bound method LocalPath.listdir of local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0')>('.coverage.*')
E        +    where <bound method LocalPath.listdir of local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0')> = local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0').listdir
E        +      where local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0') = <Testdir local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pytest-of-ned/pytest-6/test_multiprocessing_pool_terminate0')>.tmpdir

/Users/ned/coverage/pytest-cov/tests/test_pytest_cov.py:1031: AssertionError
=================================================================== short test summary info ====================================================================
FAILED tests/test_pytest_cov.py::test_multiprocessing_pool - AssertionError: assert not [local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm0000gp/T/pyte...
FAILED tests/test_pytest_cov.py::test_multiprocessing_pool_terminate - AssertionError: assert not [local('/private/var/folders/j2/gr3cj3jn63s5q8g3bjvw57hm000...
===================================================== 2 failed, 1 passed, 118 deselected in 37.99 seconds ======================================================
ERROR: InvocationError for command /Users/ned/coverage/pytest-cov/.tox/py38-coverage45-pytest45-xdist28/bin/pytest -k test_multiprocessing_pool -s -vv --fulltrace (exited with code 1)
___________________________________________________________________________ summary ____________________________________________________________________________
ERROR:   py38-coverage45-pytest45-xdist28: commands failed

@ionelmc
Copy link
Member

ionelmc commented Sep 19, 2019

I've done some debugging with Python 3.8.0b4 and logged https://bugs.python.org/issue38227 - it appears there's a different issue in b4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python3.8 Python 3.8 integration problem
Projects
None yet
Development

No branches or pull requests

4 participants