summaryrefslogtreecommitdiff
path: root/tests/coveragetest.py
Commit message (Collapse)AuthorAgeFilesLines
* refactor(test): make_data_file is a helper for making data filesNed Batchelder2021-11-201-0/+10
|
* style: convert more string formatting to f-stringsNed Batchelder2021-11-111-4/+2
|
* refactor(test): use the expected name for initializing tests.Ned Batchelder2021-11-071-4/+4
| | | | | | | | | Originally I used setup_test because something went wrong when I used setUp. I wrote https://github.com/pytest-dev/pytest/issues/8424 about it. There they say to use `-p no:nose` to disable nose interpretation. But now I simply went back to setUp, and all seems well? Not sure what changed, but using the expected name is better.
* test: we don't need two sys.path restorersNed Batchelder2021-10-141-2/+2
|
* test: don't use subprocesses where we don't have toNed Batchelder2021-10-131-0/+11
| | | | | | When running tests with `-n 0`, this shaves 4 seconds off the run time. When running the complete test suite with xdist, it takes 2 seconds longer!?
* refactor: move a test helper to CoverageTestNed Batchelder2021-08-141-0/+8
|
* test: don't report this function in pytest tracebacksNed Batchelder2021-07-201-0/+1
|
* test: change how we keep mismatched actual outputNed Batchelder2021-07-151-9/+0
| | | | | | | | | | | | 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
* 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
* refactor: pyupgrade --py36-plus tests/**.pyNed Batchelder2021-05-021-13/+13
|
* refactor: move the remaining backward.py code, no more backward.pyNed Batchelder2021-05-011-1/+1
|
* refactor: remove unneeded backward.py shimsNed Batchelder2021-05-011-4/+5
| | | | | | | | | | | | | | | Removed were: - StringIO - configparser - string_class - unicode_class - range - zip_longest - get_thread_id - path_types - shlex_quote - reprlib
* refactor: nice_file can be used as a functionNed Batchelder2021-03-221-13/+8
|
* refactor: pull module cleaning into hereNed Batchelder2021-03-111-13/+3
| | | | We don't need unittest_mixins' module cleaner anymore.
* test: simplify how StopEverything is converted to skipnedbat/remove-unittest-testcaseNed Batchelder2021-03-111-5/+1
| | | | | | 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.
* refactor: no need for our own xfail wrapperNed Batchelder2021-03-111-5/+0
|
* test: reduce use of unittestNed Batchelder2021-03-111-14/+16
|
* refactor: no need for specialized assert_starts_with methodNed Batchelder2021-03-061-5/+0
|
* refactor: replace unittest_mixins.EnvironmentAwareMixin with a pytest adapterNed Batchelder2021-03-041-2/+2
|
* test: add tests of the failure asserts from check_coverageNed Batchelder2021-02-221-3/+3
| | | | This brings the coverage of tests/coveragetest.py to 100%.
* refactor: slightly better coverage in coveragetestNed Batchelder2021-02-211-3/+3
|
* refactor: convert all skipping to pytest skipsNed Batchelder2021-02-071-1/+1
|
* refactor: remove unittest.assertCountEqualNed Batchelder2021-02-061-4/+4
| | | | Another step toward removing unittest.TestCase.
* refactor: remove reliance on unittest_mixins.StdStreamCapturingMixinNed Batchelder2021-02-021-2/+2
| | | | This is another step toward removing unittest.TestCase as a base class.
* refactor: move test mixins to their own fileNed Batchelder2021-02-021-29/+3
|
* test: keep multi-assert arc diffs workingNed Batchelder2021-01-311-23/+23
| | | | | We don't have a way to do multi-assert in the pytest we're running, so cobble it together ourselves.
* style: fix long lines and avoid backslashesnedbat/unittest2pytestNed Batchelder2021-01-311-1/+2
|
* refactor: mark an internal methodNed Batchelder2021-01-311-4/+4
|
* test: adapt to pytest assertion messagesNed Batchelder2021-01-311-4/+4
| | | | | | | | 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.
* refactor: unittest2pytest -w testsNed Batchelder2021-01-311-12/+12
| | | | One step of moving to pure pytest tests.
* PEP 626: constant tests are kept as no-opsNed Batchelder2021-01-101-1/+1
| | | | | The conditionals are now getting unwieldy, perhaps we can simplify them in the future?
* In 3.10, modules always have firstlineno==1Ned Batchelder2021-01-101-0/+5
|
* Explain a mysteryNed Batchelder2020-09-021-0/+4
|
* Better xfail mechanismNed Batchelder2020-01-181-4/+5
|
* Move test helpers to tests.helpersNed Batchelder2019-12-311-1/+2
|
* Easier to decipher arcz outputNed Batchelder2019-12-311-3/+3
|
* Warnings can be marked to only display once.Ned Batchelder2019-12-271-1/+2
|
* bpo 39114 broke 3.9, but maybe it's their bugNed Batchelder2019-12-211-0/+5
|
* I'm not sure why I was deleting these meta env varsNed Batchelder2019-12-011-7/+0
| | | | Don't we want to measure the coverage of subprocesses we start in tests?
* Coverage.py is only capitalized when it starts a sentenceNed Batchelder2019-11-101-3/+3
|
* '[run] note' is no longer supported.Ned Batchelder2019-11-091-5/+0
|
* Remove the JSON data codeNed Batchelder2019-07-101-3/+2
|
* Move arcz_to_arcs to misc so we can use it elsewhereNed Batchelder2019-06-191-42/+4
|
* Use pylint 2.xNed Batchelder2019-05-131-4/+4
|
* Prefer assertRaisesRegex to assertRaisesNed Batchelder2019-04-211-1/+1
|
* Plugin support for dynamic context (#783)Justas Sadzevičius2019-04-201-0/+10
| | | | | | | | | | | | * Introduce a new plugin type: dynamic context labels. * Test dynamic context plugins * Helper method to get full paths to measured files * Get correct filenames on all OS * Improve wording
* Fix an incorrectly named methodNed Batchelder2018-12-261-4/+4
|
* There are no kwargs to CoverageScript any moreNed Batchelder2018-11-261-4/+2
|
* Keep test directories shorterNed Batchelder2018-11-121-1/+3
|
* Comparison should always be expected,actualNed Batchelder2018-11-111-6/+6
|