summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* test: simplify how StopEverything is converted to skipnedbat/remove-unittest-testcaseNed Batchelder2021-03-115-64/+12
| | | | | | The auto-decorating metaclass was interfering with parameterized methods on Python 2.7. But we don't need it anymore anyway, since pytest will let us hook to deal with the exception in a simpler way.
* test: add tests of make_fileNed Batchelder2021-03-111-0/+56
| | | | These are copied from unittest_mixins, and adapted to pytest.
* refactor: move tests into classesNed Batchelder2021-03-111-54/+63
| | | | Now that we don't inherit from TestCase, pytest can parametrize methods.
* refactor: no need for our own xfail wrapperNed Batchelder2021-03-112-9/+3
|
* test: skip a test on pypyNed Batchelder2021-03-111-5/+4
| | | | | | I thought I knew when this passed and when it failed. Now that our tests are not TestCase's, pytest is enforcing the xfails. This passes locally on Mac, but fails in CI on Mac. So skip it.
* test: show more information for not-passed testsNed Batchelder2021-03-111-1/+1
|
* refactor: use pytest.skip instead of unittest'sNed Batchelder2021-03-112-7/+12
|
* test: reduce use of unittestNed Batchelder2021-03-1110-50/+164
|
* test: have pytest collect test classes uniformlyNed Batchelder2021-03-116-17/+8
|
* refactor: no need for specialized assert_starts_with methodNed Batchelder2021-03-064-18/+2
|
* refactor: replace unittest_mixins.EnvironmentAwareMixin with a pytest adapterNed Batchelder2021-03-042-2/+20
|
* feat: percent_covered_display in the JSON reportnedbat/tweak-metacovNed Batchelder2021-03-021-4/+13
|
* fix: don't report branches to missing lines. #1065Ned Batchelder2021-02-282-6/+6
| | | | | Fixes: #1065 Fixes: #955
* fix: improve an error message. #803Ned Batchelder2021-02-281-2/+4
| | | | Fixes #803.
* fix: HTML report makes room for 4-digit line numbers #1124Ned Batchelder2021-02-271-5/+5
| | | | Fixes: #1124
* test: add tests of report sorting optionsNed Batchelder2021-02-261-0/+10
|
* build: update to latest pylintNed Batchelder2021-02-262-4/+4
|
* test: add a test of missing sections and optionsNed Batchelder2021-02-251-0/+12
|
* refactor: put a test in a more appropriate classNed Batchelder2021-02-251-11/+11
|
* refactor: simplify a one-iteration loopNed Batchelder2021-02-251-4/+3
|
* test: oops, accidentally always skipped this testNed Batchelder2021-02-241-1/+1
|
* test: add tests of the failure asserts from check_coverageNed Batchelder2021-02-222-3/+54
| | | | This brings the coverage of tests/coveragetest.py to 100%.
* refactor: slightly better coverage in coveragetestNed Batchelder2021-02-212-4/+4
|
* refactor: convert all skipping to pytest skipsNed Batchelder2021-02-0714-107/+53
|
* refactor: a better way to skip these testsNed Batchelder2021-02-071-5/+1
|
* refactor: make all coverage.env uses uniformNed Batchelder2021-02-071-2/+2
|
* test: metacov is always xdistNed Batchelder2021-02-071-1/+1
|
* test: these tests can run during metacovNed Batchelder2021-02-071-1/+0
| | | | I forget why I thought they couldn't run during meta-coverage.
* test: more-uniform skipping of test during metacovNed Batchelder2021-02-072-25/+15
|
* refactor: remove unittest.assertCountEqualNed Batchelder2021-02-0610-37/+56
| | | | Another step toward removing unittest.TestCase.
* refactor: remove reliance on unittest_mixins.StdStreamCapturingMixinNed Batchelder2021-02-026-26/+62
| | | | This is another step toward removing unittest.TestCase as a base class.
* refactor: move test mixins to their own fileNed Batchelder2021-02-024-32/+46
|
* test: keep multi-assert arc diffs workingNed Batchelder2021-01-312-27/+23
| | | | | We don't have a way to do multi-assert in the pytest we're running, so cobble it together ourselves.
* test: configure pytest assertion rewriting in coveragetest.pyNed Batchelder2021-01-311-0/+4
|
* style: fix long lines and avoid backslashesnedbat/unittest2pytestNed Batchelder2021-01-3120-167/+179
|
* style: correct placement of auto-added pytest importsNed Batchelder2021-01-3114-14/+21
|
* style: singleton comparisons should use isNed Batchelder2021-01-317-16/+16
| | | | | | I guess the original line was wrong, but it would have been nice for unittest2pytest to fix it for me: https://github.com/pytest-dev/unittest2pytest/issues/52
* refactor: mark an internal methodNed Batchelder2021-01-311-4/+4
|
* test: adapt to pytest assertion messagesNed Batchelder2021-01-312-10/+10
| | | | | | | | Bare "assert" statements don't produce the same assertion message as self.assertEqual did: they don't include the two values compared. For some of our own asserts, add back the detailed message. For some checks of asserts, it's fine that the values are missing because the longer messsage includes the information.
* test: fix unittest2pytest brokennessNed Batchelder2021-01-312-17/+21
| | | | | | | unittest2pytest created syntax errors, reported here: https://github.com/pytest-dev/unittest2pytest/issues/51 This commit fixes them back.
* refactor: unittest2pytest -w testsNed Batchelder2021-01-3131-1294/+1165
| | | | One step of moving to pure pytest tests.
* Add combine --keep (#1110)Éric Larivière2021-01-303-6/+28
| | | | | | | | | | | * Add combine --keep Related to https://github.com/nedbat/coveragepy/issues/1108 * Fix unit tests * Fix line too long * Fix line too long
* Simplify the testing of the toml extra, fixing #1084Ned Batchelder2021-01-183-14/+34
|
* fix: combine aliases on windows base dirs (ie: ``X:\``) (fixes: #577)Valentin Lab2021-01-171-0/+14
| | | | Signed-off-by: Valentin Lab <valentin.lab@kalysto.org>
* skip_covered and skip_empty for HTML. #1090Ned Batchelder2021-01-101-19/+33
|
* Use the modern way to load modules by file name.Ned Batchelder2021-01-101-4/+15
| | | | | | | Python 3.10 finally got super-noisy about load_module, which has been deprecated since 3.4! https://docs.python.org/3/library/importlib.html#importlib.abc.Loader.load_module
* Fix a test to be usable with PEP626Ned Batchelder2021-01-101-33/+35
| | | | | | | In the old code, the return and raise were unreachable, so Python 3.10 compiled them away. This meant the return and raise messages weren't in the missing arc fragments. The new code has a path to the return and raise.
* Need new gold files for pep626 partial branch HTML reportNed Batchelder2021-01-103-16/+210
|
* Update the support files for HTML gold filesNed Batchelder2021-01-102-54/+226
|
* A better test for 'if not __debug__'Ned Batchelder2021-01-102-13/+14
|