Pytest-cov leaves .coverage.hostname.number.number data files if running tests against multiprocessing.Pool
See original GitHub issueRunning pytest with coverage for tests against multiprocessing.Pool generates several data files, but not all of them are cleaned after. It looks similar to #100.
Pool.join()
doesn’t seem to change anything.
Example filename .coverage.myhost.local.7582.948066
Here’s the repository to reproduce: https://github.com/manycoding/pytest_cov_pool_datafiles_250
Your operating system name and version: Mac OS Mojave 10.14 (18A391)
Any details about your local setup that might be helpful in troubleshooting:
pipenv shell; pipenv install
Pipfile
pytest = "*"
pytest-cov = "*"
pytest-mock = "*"
tox-pipenv = "*"
pytest-pythonpath = "*"
Detailed steps to reproduce the bug:
pytest --cov=src --cov-report=term-missing tests/test_cov_pool.py
Issue Analytics
- State:
- Created 5 years ago
- Comments:22 (13 by maintainers)
Top Results From Across the Web
Subprocess support — pytest-cov 4.0.0 documentation
Normally coverage writes the data via a pretty standard atexit handler. However, if the ... The finalizer will only run reliably if the...
Read more >Coverage.py - Read the Docs
Coverage.py has a number of commands: • run – Run a Python program and collect execution data. • combine – Combine together a...
Read more >latest PDF - pytest Documentation
pytest minimizes the number of active fixtures during test runs. If you have a parametrized fixture, then all the tests using.
Read more >PDF Mastering Python - Index of /
Package data. 438. Testing packages. 439. Unittest. 439 py.test ... Now that you are the proud owner of a Packt book, we have...
Read more >Bug listing with status UNCONFIRMED as at 2022/12/22 02 ...
Bug:128538 - "sys-apps/coreutils: /bin/hostname should be installed from ... "app-benchmarks/mmtests - a configurable test suite that runs a number of ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So this really simple trick (/s) makes the problem go away:
For some reason
Pool.__exit__
sends KILL in addition to TERM …@GergelyKalmar please open a new issue and add details