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
Describe the bug
Coverage reports a missed branch when run with pypy3.8-v7.3.6-linux64, while giving 100% coverage in python3.6 through 3.10 and pypy3.7-v7.3.5.
I suspect this may be a pypy bug but I raise it here first because it manifests as a failure in coverage testing, and you may have a better idea how to create a reproducer or what kind of data to pass to the pypy team.
Install requirements with pip install -r requirements_dev.txt (using a virtualenv if desired)
Run tests using python3 with make coverage. This will SUCCEED with 100% coverage
Install https://downloads.python.org/pypy/pypy3.8-v7.3.6-linux64.tar.bz2 -- untar (e.g., in /tmp), pypy38 -mensurepip, pypy38 -mpip install -r requirements_dev.txt (using the full path to pypy38 as necessary) (this may also require a rust compiler be installed)
Run tests using pypy38 with make PYTHON=pypy38. This will FAIL with missing branch coverage in bcd_bits, in particular that "line 703 didn't jump to line 701, because the loop on line 703 didn't complete":
698defbcd_bits(n: int) ->Generator[bool, None, None]:
699"""Return the bcd representation of n, starting with the least significant bit"""700whileTrue:
701d=n%10702n=n//10703foriin (1, 2, 4, 8): # 703 ↛ 701704yieldbool(d&i)
I'm sorry that I don't have a minimal test case. I attempted to distill this down to a simple program with just def bcd_bits and a driver function, but when I did so 100% branch coverage was reported with pypy3.8. I'm very confident that in actual use, bcd_bits is called with "large" values like 366, with 10 bits consumed from the generator, and of course reassured by the reported complete coverage under a range of other Python versions including pypy3.7.
The text was updated successfully, but these errors were encountered:
Thanks, I think this might be coverage.py not understanding the difference between PyPy3.7 and PyPy3.8. The coverage.py test suite itself has some failures under PyPy3.8 that I have to look at.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
Coverage reports a missed branch when run with pypy3.8-v7.3.6-linux64, while giving 100% coverage in python3.6 through 3.10 and pypy3.7-v7.3.5.
I suspect this may be a pypy bug but I raise it here first because it manifests as a failure in coverage testing, and you may have a better idea how to create a reproducer or what kind of data to pass to the pypy team.
To Reproduce
pip install -r requirements_dev.txt
(using a virtualenv if desired)make coverage
. This will SUCCEED with 100% coveragepypy38 -mensurepip
,pypy38 -mpip install -r requirements_dev.txt
(using the full path topypy38
as necessary) (this may also require a rust compiler be installed)make PYTHON=pypy38
. This will FAIL with missing branch coverage inbcd_bits
, in particular that "line 703 didn't jump to line 701, because the loop on line 703 didn't complete":I'm sorry that I don't have a minimal test case. I attempted to distill this down to a simple program with just
def bcd_bits
and a driver function, but when I did so 100% branch coverage was reported with pypy3.8. I'm very confident that in actual use,bcd_bits
is called with "large" values like 366, with 10 bits consumed from the generator, and of course reassured by the reported complete coverage under a range of other Python versions including pypy3.7.The text was updated successfully, but these errors were encountered: