Open
Description
Hello,
I don't have simple reproducible example but the same tox suite running pytest --cov --cov-append
reports slightly differently in py37 and py38.
I set up my .coveragerc
as follows
[path]
source =
src
*/site-packages
*\site-packages
[run]
branch = true
parallel = true
source =
my_package
tests
Running in py37 correctly report the code under src/my_package
and tests
In py38, i see additional lines .tox/py38/.../site-packages/my_package/*.py
. The only hits for those files are actually callback code called in a ProcessPoolExecutor
I tried setting concurrency = multiprocessing
but it didn't help.
As a workaround, I'm omitting these files when reporting but it's still puzzling as it only happens with 3.8 :)
Metadata
Metadata
Assignees
Labels
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
nedbat commentedon Oct 11, 2020
It's hard to know what's going on without being able to reproduce it myself, but here are some thoughts:
--debug=trace
? That will show what files are being considered for measurement.0x0L commentedon Oct 13, 2020
Hi,
Thanks for getting back to me.
I setup a repo at https://github.com/0x0L/testcov
I'm able to reproduce it locally on my machine
tox 3.20.1
nedbat commentedon Oct 13, 2020
Hmm, I can reproduce the behavior, but I don't understand why it would be different for the two versions. It might have to do with how multiprocessing is implemented?
0x0L commentedon Oct 14, 2020
It definitely looks like it but I see no mention of any change to the ProcessPool in the release notes for 3.8
0x0L commentedon Jan 28, 2021
@nedbat
Actually the issue is not python 3.8 specific. In the example repo https://github.com/0x0L/testcov I added py39 and changed the order of the envlist.
With
envlist = clean,py39,py37,py38,report
, I get[-]ProcessPoolExecutor in py38[/-][+]Strange behavior with ProcessPoolExecutor[/+]