Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 676
    • Issues 676
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 13
    • Merge requests 13
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar

April 05-07 - Mercurial Paris Conference 2023 - One day of workshop dedicated to Heptapod and Mercurial usage and workflow. There are still places available for both workshops and talks!

  • PyPyPyPy
  • pypypypy
  • Issues
  • #3876
Closed
Open
Issue created Dec 19, 2022 by Matti Picus@mattipOwner

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
Edited Dec 24, 2022 by Matti Picus
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking