Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | test: simplify how StopEverything is converted to skipnedbat/remove-unittest-testcase | Ned Batchelder | 2021-03-11 | 5 | -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_file | Ned Batchelder | 2021-03-11 | 1 | -0/+56 |
| | | | | These are copied from unittest_mixins, and adapted to pytest. | ||||
* | refactor: move tests into classes | Ned Batchelder | 2021-03-11 | 1 | -54/+63 |
| | | | | Now that we don't inherit from TestCase, pytest can parametrize methods. | ||||
* | refactor: no need for our own xfail wrapper | Ned Batchelder | 2021-03-11 | 2 | -9/+3 |
| | |||||
* | test: skip a test on pypy | Ned Batchelder | 2021-03-11 | 1 | -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 tests | Ned Batchelder | 2021-03-11 | 1 | -1/+1 |
| | |||||
* | refactor: use pytest.skip instead of unittest's | Ned Batchelder | 2021-03-11 | 2 | -7/+12 |
| | |||||
* | test: reduce use of unittest | Ned Batchelder | 2021-03-11 | 10 | -50/+164 |
| | |||||
* | test: have pytest collect test classes uniformly | Ned Batchelder | 2021-03-11 | 6 | -17/+8 |
| | |||||
* | refactor: no need for specialized assert_starts_with method | Ned Batchelder | 2021-03-06 | 4 | -18/+2 |
| | |||||
* | refactor: replace unittest_mixins.EnvironmentAwareMixin with a pytest adapter | Ned Batchelder | 2021-03-04 | 2 | -2/+20 |
| | |||||
* | feat: percent_covered_display in the JSON reportnedbat/tweak-metacov | Ned Batchelder | 2021-03-02 | 1 | -4/+13 |
| | |||||
* | fix: don't report branches to missing lines. #1065 | Ned Batchelder | 2021-02-28 | 2 | -6/+6 |
| | | | | | Fixes: #1065 Fixes: #955 | ||||
* | fix: improve an error message. #803 | Ned Batchelder | 2021-02-28 | 1 | -2/+4 |
| | | | | Fixes #803. | ||||
* | fix: HTML report makes room for 4-digit line numbers #1124 | Ned Batchelder | 2021-02-27 | 1 | -5/+5 |
| | | | | Fixes: #1124 | ||||
* | test: add tests of report sorting options | Ned Batchelder | 2021-02-26 | 1 | -0/+10 |
| | |||||
* | build: update to latest pylint | Ned Batchelder | 2021-02-26 | 2 | -4/+4 |
| | |||||
* | test: add a test of missing sections and options | Ned Batchelder | 2021-02-25 | 1 | -0/+12 |
| | |||||
* | refactor: put a test in a more appropriate class | Ned Batchelder | 2021-02-25 | 1 | -11/+11 |
| | |||||
* | refactor: simplify a one-iteration loop | Ned Batchelder | 2021-02-25 | 1 | -4/+3 |
| | |||||
* | test: oops, accidentally always skipped this test | Ned Batchelder | 2021-02-24 | 1 | -1/+1 |
| | |||||
* | test: add tests of the failure asserts from check_coverage | Ned Batchelder | 2021-02-22 | 2 | -3/+54 |
| | | | | This brings the coverage of tests/coveragetest.py to 100%. | ||||
* | refactor: slightly better coverage in coveragetest | Ned Batchelder | 2021-02-21 | 2 | -4/+4 |
| | |||||
* | refactor: convert all skipping to pytest skips | Ned Batchelder | 2021-02-07 | 14 | -107/+53 |
| | |||||
* | refactor: a better way to skip these tests | Ned Batchelder | 2021-02-07 | 1 | -5/+1 |
| | |||||
* | refactor: make all coverage.env uses uniform | Ned Batchelder | 2021-02-07 | 1 | -2/+2 |
| | |||||
* | test: metacov is always xdist | Ned Batchelder | 2021-02-07 | 1 | -1/+1 |
| | |||||
* | test: these tests can run during metacov | Ned Batchelder | 2021-02-07 | 1 | -1/+0 |
| | | | | I forget why I thought they couldn't run during meta-coverage. | ||||
* | test: more-uniform skipping of test during metacov | Ned Batchelder | 2021-02-07 | 2 | -25/+15 |
| | |||||
* | refactor: remove unittest.assertCountEqual | Ned Batchelder | 2021-02-06 | 10 | -37/+56 |
| | | | | Another step toward removing unittest.TestCase. | ||||
* | refactor: remove reliance on unittest_mixins.StdStreamCapturingMixin | Ned Batchelder | 2021-02-02 | 6 | -26/+62 |
| | | | | This is another step toward removing unittest.TestCase as a base class. | ||||
* | refactor: move test mixins to their own file | Ned Batchelder | 2021-02-02 | 4 | -32/+46 |
| | |||||
* | test: keep multi-assert arc diffs working | Ned Batchelder | 2021-01-31 | 2 | -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.py | Ned Batchelder | 2021-01-31 | 1 | -0/+4 |
| | |||||
* | style: fix long lines and avoid backslashesnedbat/unittest2pytest | Ned Batchelder | 2021-01-31 | 20 | -167/+179 |
| | |||||
* | style: correct placement of auto-added pytest imports | Ned Batchelder | 2021-01-31 | 14 | -14/+21 |
| | |||||
* | style: singleton comparisons should use is | Ned Batchelder | 2021-01-31 | 7 | -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 method | Ned Batchelder | 2021-01-31 | 1 | -4/+4 |
| | |||||
* | test: adapt to pytest assertion messages | Ned Batchelder | 2021-01-31 | 2 | -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 brokenness | Ned Batchelder | 2021-01-31 | 2 | -17/+21 |
| | | | | | | | unittest2pytest created syntax errors, reported here: https://github.com/pytest-dev/unittest2pytest/issues/51 This commit fixes them back. | ||||
* | refactor: unittest2pytest -w tests | Ned Batchelder | 2021-01-31 | 31 | -1294/+1165 |
| | | | | One step of moving to pure pytest tests. | ||||
* | Add combine --keep (#1110) | Éric Larivière | 2021-01-30 | 3 | -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 #1084 | Ned Batchelder | 2021-01-18 | 3 | -14/+34 |
| | |||||
* | fix: combine aliases on windows base dirs (ie: ``X:\``) (fixes: #577) | Valentin Lab | 2021-01-17 | 1 | -0/+14 |
| | | | | Signed-off-by: Valentin Lab <valentin.lab@kalysto.org> | ||||
* | skip_covered and skip_empty for HTML. #1090 | Ned Batchelder | 2021-01-10 | 1 | -19/+33 |
| | |||||
* | Use the modern way to load modules by file name. | Ned Batchelder | 2021-01-10 | 1 | -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 PEP626 | Ned Batchelder | 2021-01-10 | 1 | -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 report | Ned Batchelder | 2021-01-10 | 3 | -16/+210 |
| | |||||
* | Update the support files for HTML gold files | Ned Batchelder | 2021-01-10 | 2 | -54/+226 |
| | |||||
* | A better test for 'if not __debug__' | Ned Batchelder | 2021-01-10 | 2 | -13/+14 |
| |