| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
|
|
| |
tomli couldn't use coverage themselves because we imported it early.
Cleaning sys.modules means their own imports will actually execute after
coverage has started, so their files will be properly measured.
|
|
|
|
|
| |
Tests are failing because we expect to see three different pids, but
only get two. Is that because the work is being completed too quickly?
|
| |
|
|
|
|
|
|
|
| |
Coverage.py predates sets as a built-in data structure, so the file data
collection has long been dicts with None as the values. Sets are
available to us now (since Python 2.4 in 2004, which coverage.py dropped
support for in 2014!), we use sets.
|
|
|
|
| |
missing branches. #1205
|
| |
|
|
|
|
|
| |
The comprehension would only completely finish (->exit) if the assert
was going to fail. So we expect it to not finish.
|
|
|
|
|
|
| |
The old pycache_prefix logic was because we would run tests in Docker
containers, and they went faster if we set PYTHONCACHEPREFIX. But we
don't do that anymore, so we can use simpler code.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
combined. #1105 (#1208)
|
| |
|
|
|
|
| |
Because they are warnings issued while parsing the configuration file, it's not
possible to suppress them with the coverage configuration.
|
|
|
|
|
|
|
|
|
|
|
| |
python3 -m pip install codespell
codespell --ignore-words-list="ba,cant,datas,hart,linke,ned,nin,overthere,upto" --skip="*.js"
* Fix typos discovered by codespell
* datas
* intgers ==> integers
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The old way, extra warnings that we don't care about could creep in. For some
reason, disabling PyContracts causes "imp" DeprecationWarnings to appear in the
list.
Rather than assert there's only one warning, assert there's only one from us.
|
| |
|
|
|
|
|
|
| |
Python versions before 3.10 didn't trace trailing "pass" statements
correctly. I don't think that will change at this point, so we'll skip
this test for those versions.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now when a goldtest has a failure, the actual mismatched output will be written
to the tests/actual directory.
Along the way, I removed some obsolete settings which were only used by unittest
and unittest_mixins, which we no longer use:
- COVERAGE_KEEP_TMP
- COVERAGE_ENV_ID
- $TMPDIR/coverage_test
|
|
|
|
|
|
|
|
| |
Fixes a few unusual issues with reports:
- #580: HTML report generation fails on too long path
- #584: File collisions in coverage report html
- #1167: Remove leading underscore in coverage html
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Support TOML v1.0.0 syntax in `pyproject.toml`
fixes #1180
Co-authored-by: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com>
* fix toml meta test
* use pytest.mark.parametrize to narrow test failure
* Update tests/test_config.py
Co-authored-by: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com>
Co-authored-by: Taneli Hukkinen <3275109+hukkin@users.noreply.github.com>
|
|
|
|
| |
See: https://bugs.python.org/issue44600
|
|
|
|
|
| |
Note: this test fails on 3.10.0b3, the current 3.10 version in the CI
tests.
|
|
|
|
|
|
|
|
| |
The match and case soft keywords are shown in bold when they are
keywords, and not when they are not.
The underscore soft keyword is ignored, because it is harder to get
right, and because it doesn't look that much different in bold anyway.
|
| |
|
|
|
|
| |
This need 3.10.0b3 (not yet released) to fully pass.
|
|
|
|
|
|
|
|
|
| |
Every statement-level ast node should be tested. Annotated assignment
was missing.
Also, we don't need "exec" anymore, that was only for Python 2.
And: this is the 1000th test!
|
|
|
|
|
|
|
| |
The code for the helper is uninteresting and long, and only makes it harder to
see what is going wrong. Hide it.
https://docs.pytest.org/en/latest/example/simple.html#writing-well-integrated-assertion-helpers
|
| |
|
| |
|
|
|
|
|
|
|
| |
Use the same rounding rules for the fail-under message that are used for totals
everywhere else, so that it won't say:
total of 100 is less than fail-under=100
|
|
|
|
|
| |
On Python 3.10, we were getting other warnings mixed into the warnings the tests
were looking for. This change lets us only look at the CoverageWarnings.
|
|
|
|
|
| |
The type-check is left over from Python 2 compatibility, we don't need
it anymore.
|
| |
|
| |
|
|
|
|
|
|
| |
This makes coverage warnings visible when running test suites under
pytest. But it also means some uninteresting warnings would show up in
our own test suite, so we had to catch or suppress those.
|
| |
|
|
|
|
|
| |
This was changed in 3.10.0b1 and 3.9.5. Seems like a strange change to
throw into 3.9.5, but there it is. Fixes #1161.
|