Coverage 6.0 reports less than 100% coverage for Tomli · Issue #1228 · nedbat/coveragepy (original) (raw)
What commands did you run?
* foo@bar:~$ cd /tmp/
foo@bar:/tmp$ git clone https://github.com/hukkin/tomli.git
Cloning into 'tomli'...
remote: Enumerating objects: 1885, done.
remote: Counting objects: 100% (510/510), done.
remote: Compressing objects: 100% (260/260), done.
remote: Total 1885 (delta 313), reused 335 (delta 229), pack-reused 1375
Receiving objects: 100% (1885/1885), 310.30 KiB | 1.85 MiB/s, done.
Resolving deltas: 100% (775/775), done.
foo@bar:/tmp$ cd tomli/
foo@bar:/tmp/tomli$ python3 -m venv venv
foo@bar:/tmp/tomli$ . venv/bin/activate
(venv) foo@bar:/tmp/tomli$ pip install . pytest-cov python-dateutil
Processing /tmp/tomli
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... done
Collecting pytest-cov
Using cached pytest_cov-3.0.0-py3-none-any.whl (20 kB)
Collecting python-dateutil
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytest>=4.6
Using cached pytest-6.2.5-py3-none-any.whl (280 kB)
Collecting coverage[toml]>=5.2.1
Using cached coverage-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (255 kB)
Collecting six>=1.5
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting py>=1.8.2
Using cached py-1.10.0-py2.py3-none-any.whl (97 kB)
Collecting iniconfig
Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
Collecting attrs>=19.2.0
Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting packaging
Using cached packaging-21.0-py3-none-any.whl (40 kB)
Collecting toml
Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting pluggy<2.0,>=0.12
Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting pyparsing>=2.0.2
Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Building wheels for collected packages: tomli
Building wheel for tomli (PEP 517) ... done
Created wheel for tomli: filename=tomli-1.2.1-py3-none-any.whl size=11869 sha256=9771a834d2d82bfb701afd93a640bbd093c9ac5d7896425e2b03ac0a6d8dcbc6
Stored in directory: /tmp/pip-ephem-wheel-cache-4_qivjx_/wheels/2a/be/a2/c2e2f410105e5a607018317cab46427d50645c558623d032be
Successfully built tomli
Installing collected packages: py, iniconfig, attrs, pyparsing, packaging, toml, pluggy, pytest, tomli, coverage, pytest-cov, six, python-dateutil
Successfully installed attrs-21.2.0 coverage-6.0 iniconfig-1.1.1 packaging-21.0 pluggy-1.0.0 py-1.10.0 pyparsing-2.4.7 pytest-6.2.5 pytest-cov-3.0.0 python-dateutil-2.8.2 six-1.16.0 toml-0.10.2 tomli-1.2.1
(venv) foo@bar:/tmp/tomli$ python -m pytest --cov --cov-fail-under=100
========================================== test session starts ==========================================
platform linux -- Python 3.8.10, pytest-6.2.5, py-1.10.0, pluggy-1.0.0
rootdir: /tmp/tomli, configfile: pyproject.toml
plugins: cov-3.0.0
collected 466 items
tests/test_error.py ... [ 0%]
tests/test_extras.py ............................................................................ [ 16%]
................................................................................................. [ 37%]
............................................................................................... [ 58%]
tests/test_flags.py . [ 58%]
tests/test_for_profiler.py . [ 58%]
tests/test_misc.py .... [ 59%]
tests/test_toml_compliance.py .............................................................x.x... [ 73%]
................................................................................................. [ 94%]
......................... [100%]
---------- coverage: platform linux, python 3.8.10-final-0 -----------
Name Stmts Miss Branch BrPart Cover
tomli/_parser.py 452 60 178 0 90%
tomli/_re.py 33 13 8 0 68%
TOTAL 485 73 186 0 89%
FAIL Required test coverage of 100% not reached. Total coverage: 88.82%
==================================== 464 passed, 2 xfailed in 1.34s =====================================