summaryrefslogtreecommitdiff
path: root/coverage/inorout.py
Commit message (Collapse)AuthorAgeFilesLines
* test(fix): keep SourceIncludeOmitTest's from clobbering each otherNed Batchelder2021-11-241-0/+3
| | | | | | | | Because they cd'd into a folder in the shared source tree, their data files would collide, leading to flaky tests. Also, add a check that the tests collected some data, and add sys.path to the debug=trace output.
* refactor: specialize exceptionsNed Batchelder2021-11-141-2/+2
| | | | | | CoverageException is fine as a base class, but not good to use for raising (and catching sometimes). Introduce specialized exceptions that allow third-party tools to integrate better.
* fix: suppress exceptions when finding source= modules. #1203Ned Batchelder2021-11-131-1/+1
|
* refactor(test): don't even import contracts if not using PyContractsNed Batchelder2021-11-041-4/+5
| | | | | | | | On CPython 3.11, PyContracts fails on import, so we need to shut it off more completely. PyContracts is unmaintained these days, so we'll probably get rid of it completely soon.
* fix: don't warn about already imported files for namespace packages #888Ned Batchelder2021-10-311-0/+4
| | | | Ignore namespace packages in the already-imported check. #888
* fix: avoid measuring generated code. #1160Ned Batchelder2021-10-181-0/+3
|
* refactor: no need for specialized pyexpat code anymoreNed Batchelder2021-10-181-5/+0
| | | | | | | | The pyexpat bug that plagued us was fixed in Python 3.4: https://bugs.python.org/issue22462 We no longer need the code that adapted to it. The test will remain, couldn't hurt.
* fix: source modules need to be re-imported. #1232Ned Batchelder2021-10-111-18/+20
|
* fix: make third-party detection work with namespace packages. #1231Ned Batchelder2021-10-101-9/+32
|
* style: use the official designation for utf-8Ned Batchelder2021-10-101-1/+1
| | | | | Yes, this is completely unimportant. Don't ask me why I bothered, I'm not really sure.
* fix: correct previous refactoringsNed Batchelder2021-07-281-1/+1
| | | | | File names should not be rendered with !r, since on Windows that will produce double backslashes, which only confuses people.
* refactor: convert %-strings to f-stringsNed Batchelder2021-07-281-4/+3
|
* feat: warnings are now real warningsNed Batchelder2021-05-301-8/+5
| | | | | | 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.
* refactor: move exceptions to their own moduleNed Batchelder2021-05-021-1/+1
|
* refactor: pyupgrade --py36-plus coverage/*.pyNed Batchelder2021-05-021-16/+14
|
* refactor: move the remaining backward.py code, no more backward.pyNed Batchelder2021-05-011-31/+9
|
* refactor: remove yet more unneeded backward.py shimsNed Batchelder2021-05-011-2/+2
| | | | | | | | Gone are: - PYC_MAGIC_NUMBER - code_object - SimpleNamespace
* fix: don't warn that dynamic plugins already imported their source files. #1150Ned Batchelder2021-05-011-0/+5
|
* fix: restore metacov functioningNed Batchelder2021-04-111-2/+0
| | | | | | | 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-111-14/+22
| | | | | | This finishes the last bit of #905 Also includes tighter logging of the reason for not tracing modules.
* debug: label each matcher with its roleNed Batchelder2021-04-111-7/+7
|
* fix: don't measure third-party packagesNed Batchelder2021-04-101-9/+94
| | | | | | | | | | | | 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
* refactor: move stdlib and coverage location logic into functionsNed Batchelder2021-04-101-29/+41
|
* fix: remove debugging code I checked in by accidentNed Batchelder2021-03-191-3/+0
|
* style: correct two recent lint faux pasNed Batchelder2021-03-181-0/+3
|
* Create Way to force package even if filepath exists (#1026)Thomas Grainger2020-09-121-0/+1
| | | Fixes: #268
* More details on --source filteringNed Batchelder2020-06-291-9/+33
|
* Don't trace non-encodable file names. #891Ned Batchelder2020-01-011-0/+6
|
* A helper to get code objectsNed Batchelder2019-12-021-5/+2
|
* Correct some function names and docstrings. #843Ned Batchelder2019-09-091-8/+11
|
* No need for format indexes (mostly)Ned Batchelder2019-09-011-1/+1
|
* Don't try to use PyPy 'filenames' like '<builtin>/lib_pypy/_structseq.py'Ned Batchelder2018-11-251-2/+4
|
* Update NOTICE link to GitHub.Ned Batchelder2018-06-241-1/+1
|
* Finish up the inorout docstringsNed Batchelder2018-03-131-2/+17
|
* check_preimported=True controls whether coverage checks pre-imported files ↵Ned Batchelder2018-03-061-3/+0
| | | | when starting
* In 3.7, namespace modules can have: mod.__file__ is NoneNed Batchelder2018-03-051-7/+16
|
* More uniformityNed Batchelder2018-02-261-6/+6
| | | | | --HG-- branch : inorout
* Huge refactor of code out of control into inoroutNed Batchelder2018-02-251-0/+440
--HG-- branch : inorout