summaryrefslogtreecommitdiff
path: root/coverage/misc.py
Commit message (Collapse)AuthorAgeFilesLines
* refactor: human sortingNed Batchelder2022-11-061-4/+7
|
* refactor: since we are showing regexes, make them a bit simplerNed Batchelder2022-10-151-1/+5
| | | | | | The old code would always wrap the regex in a needless `(?s:...)` parenthesis. Path aliases are always single regexes, so they don't need that extra wrapping. This makes logged path maps easier to understand.
* fix: */foo matches "foo/x.py", to help with combining relative file names. #991Ned Batchelder2022-10-151-1/+1
|
* style: use new regex match object group accessNed Batchelder2022-07-081-3/+3
|
* style: parens should indent the same as their opening lineNed Batchelder2022-05-011-1/+1
|
* refactor: filename_suffix() is only used by CoverageData, so move itNed Batchelder2021-11-161-22/+0
|
* refactor: a plural helperNed Batchelder2021-11-131-0/+11
|
* style: convert more string formatting to f-stringsNed Batchelder2021-11-111-1/+1
|
* refactor(test): don't even import contracts if not using PyContractsNed Batchelder2021-11-041-6/+1
| | | | | | | | 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: use human sorting on human-readable thingsNed Batchelder2021-10-121-0/+31
|
* fix: source modules need to be re-imported. #1232Ned Batchelder2021-10-111-10/+28
|
* style: use the official designation for utf-8Ned Batchelder2021-10-101-3/+3
| | | | | Yes, this is completely unimportant. Don't ask me why I bothered, I'm not really sure.
* test: mark some uncovered thingsNed Batchelder2021-10-081-1/+3
|
* fix: make exceptions importable from coverage.misc again. #1226Ned Batchelder2021-10-061-0/+5
|
* fix: pretend we didn't import third-party packages we use. #1228Ned Batchelder2021-10-061-0/+27
| | | | | | tomli couldn't use coverage themselves because we imported it early. Cleaning sys.modules means their own imports will actually execute after coverage has started, so their files will be properly measured.
* fix: Avoid a race condition in misc.ensure_dir (#1220)Clément Pit-Claudel2021-09-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * coverage/misc.py (ensure_dir): Pass exist_ok to os.makedirs, ensuring that if two concurrent instances of coverage.py entering this function at the same time won't fail with FileExistsError. Sample backtrace: Traceback (most recent call last): File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/usr/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/user/.local/lib/python3.8/site-packages/coverage/__main__.py", line 8, in <module> sys.exit(main()) File "/home/user/.local/lib/python3.8/site-packages/coverage/cmdline.py", line 871, in main status = CoverageScript().command_line(argv) File "/home/user/.local/lib/python3.8/site-packages/coverage/cmdline.py", line 588, in command_line return self.do_run(options, args) File "/home/user/.local/lib/python3.8/site-packages/coverage/cmdline.py", line 743, in do_run self.coverage.start() File "/home/user/.local/lib/python3.8/site-packages/coverage/control.py", line 535, in start self._init_for_start() File "/home/user/.local/lib/python3.8/site-packages/coverage/control.py", line 474, in _init_for_start self._init_data(suffix) File "/home/user/.local/lib/python3.8/site-packages/coverage/control.py", line 512, in _init_data ensure_dir_for_file(self.config.data_file) File "/home/user/.local/lib/python3.8/site-packages/coverage/misc.py", line 165, in ensure_dir_for_file ensure_dir(os.path.dirname(path)) File "/.local/lib/python3.8/site-packages/coverage/misc.py", line 160, in ensure_dir os.makedirs(directory) File "/usr/lib/python3.8/os.py", line 223, in makedirs mkdir(name, mode)
* refactor: convert %-strings to f-stringsNed Batchelder2021-07-281-5/+3
|
* fix: it just seems silly to use more than 32 chars for a fingerprintNed Batchelder2021-07-141-1/+1
|
* fix: use a modern hash when fingerprinting. #1189Ned Batchelder2021-07-131-8/+8
|
* refactor: move exceptions to their own moduleNed Batchelder2021-05-021-44/+1
|
* refactor: pyupgrade --py36-plus coverage/*.pyNed Batchelder2021-05-021-3/+3
|
* refactor: move the remaining backward.py code, no more backward.pyNed Batchelder2021-05-011-0/+25
|
* refactor: remove more unneeded backward.py shimsNed Batchelder2021-05-011-3/+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-011-3/+3
| | | | | | | | | | | | | | | 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-011-2/+1
|
* build: update to latest pylintNed Batchelder2021-02-261-1/+1
|
* Use set literalsNed Batchelder2021-01-031-1/+1
|
* Move test helpers to tests.helpersNed Batchelder2019-12-311-70/+0
|
* Easier to decipher arcz outputNed Batchelder2019-12-311-0/+31
|
* Coverage(data_file=None) means no data file at all. #871Ned Batchelder2019-12-021-0/+14
|
* Polishing from a lightning talkNed Batchelder2019-12-021-8/+8
|
* Finish the sqldata.py docstringsNed Batchelder2019-11-101-1/+9
|
* Polish up substitute_variables based on a lightning talkNed Batchelder2019-09-141-25/+25
|
* Document the module-level stuff. #837Ned Batchelder2019-09-091-1/+1
|
* Remove the JSON data codeNed Batchelder2019-07-101-0/+14
|
* Move arcz_to_arcs to misc so we can use it elsewhereNed Batchelder2019-06-191-0/+39
|
* Polishing substitute_variablesNed Batchelder2019-06-111-3/+2
|
* group() can return a number of groups. Nice.Ned Batchelder2019-06-101-1/+1
|
* Move code to where it belongsNed Batchelder2018-12-241-38/+0
|
* Debug-time environment variables can be set with set_env.pyNed Batchelder2018-11-031-0/+1
|
* You can turn off contracts while debugging testsNed Batchelder2018-11-031-1/+5
|
* Helpers for making directoriesNed Batchelder2018-10-211-0/+15
|
* Name decorator components to avoid docstring requirementNed Batchelder2018-09-091-5/+4
|
* Defaultable variable substitutionNed Batchelder2018-09-081-5/+10
|
* Py2 doesn't like using unmatched groups in regex resultsNed Batchelder2018-09-081-1/+1
|
* Strict variable substitution is now an optionNed Batchelder2018-09-081-2/+11
|
* Move variable substitution to be independentNed Batchelder2018-09-081-0/+37
|
* Merge branch 'nedbat/data-sqlite'Ned Batchelder2018-08-241-10/+0
|\
| * Improved debuggingNed Batchelder2018-08-041-10/+0
| |
* | Hasher needed more information about nesting to avoid collisionsNed Batchelder2018-08-111-0/+1
|/