After adding support for python 3.8 (in addition to 3.6 and 3.7), my coverage suddenly dropped by a large amount with no obvious errors. I use the Travis CI and everything passes there, the coverage report also shows the lines are covered, and the commits don’t change anything obvious.
Has anyone noticed any considerable difference with python3.8 in terms of execution?
This is a comparison with and without the single line in the travis config adding python3.8:
The base commit url to compare from is
and the commit url to compare to is
I looked at the CI coverage report using
/home/travis/virtualenv/python3.8.0/bin/coverage3 report -m
and it contains thousands of nonexisting lines:
avocado_i2n/cmd_parser.py 128 85 34% 196-200, 203-204, 208-210, 214-216, 316-1663
In particular, the missing lines 316-1663 don’t exist as the file is 221 lines long! This is strange and I don’t know if others have experienced this. Comparing with another python 3 version like 3.7 I get this correctly:
avocado_i2n/cmd_parser.py 111 13 88% 196-200, 203-204, 208-210, 214-216
So the python 3.8 coverage is adding phantom lines.
The solution I found was to explicitly require a
coverage version 5.0 through pip. Hopefully Travis will eventually catch up as other people using their current default coverage version could encounter this too.