summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* feat: soft keywords are shown in bold in the HTML reportNed Batchelder2021-06-061-0/+36
| | | | | | | | 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.
* feat: add support for Python 3.10 match-case statementsNed Batchelder2021-06-062-0/+69
|
* fix: in Python 3.10, leaving a with block exits through the with statement.Ned Batchelder2021-06-051-7/+106
| | | | This need 3.10.0b3 (not yet released) to fully pass.
* test: add a test for annotated assignmentNed Batchelder2021-06-051-0/+15
| | | | | | | | | 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!
* test: hide check_coverage source in pytest tracebacksNed Batchelder2021-06-041-0/+2
| | | | | | | 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
* fix: use more explicit names for some debug informationNed Batchelder2021-06-021-1/+1
|
* refactor: remove globals from NumbersNed Batchelder2021-06-011-28/+13
|
* fix: --fail-under=100 could report 100 is less than 100.Ned Batchelder2021-05-312-0/+28
| | | | | | | 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
* test: better checking for CoverageWarningsNed Batchelder2021-05-312-3/+3
| | | | | 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.
* test: simplify run_command output handlingNed Batchelder2021-05-301-5/+3
| | | | | The type-check is left over from Python 2 compatibility, we don't need it anymore.
* build: mark a line as not coveredNed Batchelder2021-05-301-1/+1
|
* build: mark a few lines as not coveredNed Batchelder2021-05-301-2/+2
|
* feat: warnings are now real warningsNed Batchelder2021-05-309-75/+166
| | | | | | 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.
* fix: Python 3.8.10 changed how __file__ is reported when running directoriesNed Batchelder2021-05-111-1/+1
|
* test: traced file names seem to be absolute now? #1161Ned Batchelder2021-05-082-9/+13
| | | | | 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.
* fix: make data collection operations thread-safeNed Batchelder2021-05-031-1/+6
|
* test: remove a changed test that wasn't supposed to be part of bb73791bNed Batchelder2021-05-031-6/+1
|
* refactor: convert more %-formatting to f-stringsNed Batchelder2021-05-021-1/+6
|
* refactor: move exceptions to their own moduleNed Batchelder2021-05-0214-16/+19
|
* test: update to latest pytestNed Batchelder2021-05-021-1/+1
|
* build: update to latest pylintgood-metaNed Batchelder2021-05-021-2/+0
|
* refactor: remove a few more version checksNed Batchelder2021-05-026-25/+8
|
* refactor: remove unneeded py2-only gold filesNed Batchelder2021-05-022-161/+0
|
* refactor: pyupgrade --py36-plus tests/**.pyNed Batchelder2021-05-0233-186/+171
|
* refactor: move the remaining backward.py code, no more backward.pyNed Batchelder2021-05-018-13/+9
|
* refactor: remove some unneeded behavior conditionalsNed Batchelder2021-05-012-10/+0
|
* refactor: remove yet more unneeded backward.py shimsNed Batchelder2021-05-011-2/+2
| | | | | | | | Gone are: - PYC_MAGIC_NUMBER - code_object - SimpleNamespace
* refactor: remove more unneeded backward.py shimsNed Batchelder2021-05-013-28/+2
| | | | | | | | | | | | | | Gone are: - iitems - litems - iternext - to_bytes - to_string - binary_bytes - byte_to_int - bytes_to_ints - BUILTINS
* refactor: remove unneeded backward.py shimsNed Batchelder2021-05-016-22/+24
| | | | | | | | | | | | | | | Removed were: - StringIO - configparser - string_class - unicode_class - range - zip_longest - get_thread_id - path_types - shlex_quote - reprlib
* refactor: remove code explicitly choosing between py2 and py3Ned Batchelder2021-05-0111-95/+11
|
* fix: don't warn that dynamic plugins already imported their source files. #1150Ned Batchelder2021-05-012-1/+35
|
* Use current_thread instead of currentThread that was deprecated in Python 3.10Karthikeyan Singaravelan2021-04-171-1/+1
|
* build: make tags like 5.6.1 not coverage-5.6.1Ned Batchelder2021-04-151-1/+1
|
* build: suppress new 3.10 warningsNed Batchelder2021-04-141-0/+11
|
* test: improve zipfile testNed Batchelder2021-04-142-10/+14
| | | | | | | Before this commit, the GetZipBytesTest.test_get_encoded_zip_files test was flaky on Python 3.10.0a7. Since I had just added new files to the common zip file, I tried splitting the newly added stuff into its own file, and that seemed to fix the problem.
* test: remove the .egg testNed Batchelder2021-04-145-27/+19
| | | | | | People don't use .egg much anymore, distutils is showing deprecation warnings, and coverage.py only deals with them the same way it deals with .zip files, so let's just rely on a .zip test to cover that.
* fix: correct slight mis-layout of the hotkey panelsNed Batchelder2021-04-131-4/+4
|
* fix: restore metacov functioningNed Batchelder2021-04-111-1/+1
| | | | | | | The check for coverage files inside the --source check disables our metacoverage. Removing it means that coverage files will still not be measured, but the reason will be given as "is third-party" rather than "is part of coverage.py," which is a small price to pay.
* fix: don't measure third-party scriptsnedbat/bin-excludeNed Batchelder2021-04-112-45/+112
| | | | | | This finishes the last bit of #905 Also includes tighter logging of the reason for not tracing modules.
* test: don't complain if an environment variable we don't want doesn't existNed Batchelder2021-04-111-1/+1
|
* debug: label each matcher with its roleNed Batchelder2021-04-111-6/+6
|
* fix: don't measure third-party packagesNed Batchelder2021-04-102-3/+102
| | | | | | | | | | | | Avoid measuring code located where third-party packages get installed. We have to take care to measure --source code even if it is installed in a third-party location. This also fixes #905, coverage generating warnings about coverage being imported when it will be measured. https://github.com/nedbat/coveragepy/issues/876 https://github.com/nedbat/coveragepy/issues/905
* fix: make TreeMatcher right for case-sensitive worldsNed Batchelder2021-04-101-0/+5
|
* refactor: nice_file can be used as a functionNed Batchelder2021-03-223-18/+19
|
* refactor: make_file can be used as a functionNed Batchelder2021-03-222-39/+46
|
* refactor: simplify temp dir cd codeNed Batchelder2021-03-221-15/+10
|
* refactor: correct a file name: test_mixins.pyNed Batchelder2021-03-111-0/+0
|
* refactor: pull module cleaning into hereNed Batchelder2021-03-114-60/+86
| | | | We don't need unittest_mixins' module cleaner anymore.
* refactor: remove unused test class settingNed Batchelder2021-03-115-18/+0
| | | | | | | | | unittest_mixins would check that files got created if a test made a temporary directory, so that we could trim down making temp dirs needlessly. But we don't use unittest_mixins any more, so this setting does nothing. Remove it.
* refactor: our own change_dir context managerNed Batchelder2021-03-114-4/+20
| | | | We don't need to use the one from unittest_mixins.