coverage, bcrypt, pypy 7.3.10
After running pytest with coverage, it creates an sqlite3 database. Then one can run python -m coverage report -m --fail-under 100
. When doing this on the bcrypt package with pypy3.8 v7.3.10, it reports missing coverage:
$ ../pypy3.8-v7.3.10-linux64/bin/pypy -m coverage report -m --fail-under 100
Name Stmts Miss Branch BrPart Cover Missing
----------------------------------------------------------------------------------------------------------------------------------
/home/matti/oss/pypy3.8-v7.3.9-linux64/lib/pypy3.8/site-packages/bcrypt/__about__.py 12 0 0 0 100%
/home/matti/oss/pypy3.8-v7.3.9-linux64/lib/pypy3.8/site-packages/bcrypt/__init__.py 38 0 18 0 100%
tests/test_bcrypt.py 97 9 24 0 78% 208, 214, 230, 235, 240, 245, 250, 447, 486
----------------------------------------------------------------------------------------------------------------------------------
TOTAL 147 9 42 0 86%
Coverage failure: total of 86 is less than fail-under=100
but running the same command with pypy3.8 v7.3.9 gives a different result
$ ../pypy3.8-v7.3.9-linux64/bin/pypy -m coverage report -m --fail-under 100
Name Stmts Miss Branch BrPart Cover Missing
----------------------------------------------------------------------------------------------------------------------------------
/home/matti/oss/pypy3.8-v7.3.9-linux64/lib/pypy3.8/site-packages/bcrypt/__about__.py 12 0 0 0 100%
/home/matti/oss/pypy3.8-v7.3.9-linux64/lib/pypy3.8/site-packages/bcrypt/__init__.py 38 0 18 0 100%
tests/test_bcrypt.py 88 0 6 0 100%
----------------------------------------------------------------------------------------------------------------------------------
TOTAL 138 0 24 0 100%
Maybe something is off with the newer sqlite3 code? For 7.3.10 we updated to sqlite3.4.0 and also changed the sqlite3 module.
The complete command sequence to reproduce
From a fresh portable PyPy tarball, in a checkout of the bcrypt repo:
$ <path/to>/bin/pypy -mensurepip
$ <path/to>/bin/pypy -m pip install coverage pytest .
$ <path/to>/bin/pypy -m coverage run -m pytest --strict-markers
$ <path/to>/bin/pypy -m coverage combine
$ <path/to>/bin/pypy -m coverage report -m --fail-under 100