Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | refactor: we no longer need to protect against UnicodeError, it was only on 3.6 | Ned Batchelder | 2022-01-03 | 1 | -7/+1 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was the failure it was protecting against on Python 3.6: ``` ___________________________ ProcessTest.test_lang_c ____________________________ [gw0] linux -- Python 3.6.15 /home/runner/work/coveragepy/coveragepy/.tox/py36/bin/python self = <tests.test_process.ProcessTest object at 0x7fe57e63b198> @pytest.mark.skipif(env.PYPY, reason="PyPy is unreliable with this test") # Jython as of 2.7.1rc3 won't compile a filename that isn't utf-8. @pytest.mark.skipif(env.JYTHON, reason="Jython can't handle this test") def test_lang_c(self): # LANG=C forces getfilesystemencoding on Linux to 'ascii', which causes # failures with non-ascii file names. We don't want to make a real file # with strange characters, though, because that gets the test runners # tangled up. This will isolate the concerns to the coverage.py code. # https://github.com/nedbat/coveragepy/issues/533 self.make_file("weird_file.py", r""" globs = {} code = "a = 1\nb = 2\n" exec(compile(code, "wut\xe9\xea\xeb\xec\x01\x02.py", 'exec'), globs) print(globs['a']) print(globs['b']) """) self.set_environ("LANG", "C") out = self.run_command("coverage run weird_file.py") > assert out == "1\n2\n" E assert 'Traceback (m...ion by zero\n' == '1\n2\n' E - 1 E - 2 E + Traceback (most recent call last): E + File "/home/runner/work/coveragepy/coveragepy/coverage/files.py", line 149, in abs_file E + path = os.path.realpath(path) E + File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/posixpath.py", line 395, in realpath E + path, ok = _joinrealpath(filename[:0], filename, {}) E + File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/posixpath.py", line 429, in _joinrealpath E + if not islink(newpath): E + File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/posixpath.py", line 171, in islink E + st = os.lstat(path) E + UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-6: ordinal not in range(128) ``` | ||||
* | refactor: super-nit-picky tweaks from mypy | Ned Batchelder | 2021-11-21 | 1 | -2/+2 |
| | |||||
* | refactor: specialize exceptions | Ned Batchelder | 2021-11-14 | 1 | -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: remapping paths during combining needs to follow relative_files=True. #1147 | Ned Batchelder | 2021-11-06 | 1 | -2/+5 |
| | |||||
* | fix: give a default value to the name argument for Matchers. #1273 | Ned Batchelder | 2021-11-05 | 1 | -3/+3 |
| | |||||
* | fix: use human sorting on human-readable things | Ned Batchelder | 2021-10-12 | 1 | -2/+2 |
| | |||||
* | style: the name of the matchers don't need quotes in the reprs | Ned Batchelder | 2021-10-10 | 1 | -3/+3 |
| | |||||
* | test: canonicalize this bit of debug output | Ned Batchelder | 2021-10-08 | 1 | -1/+1 |
| | |||||
* | fix: generate flat file names differently | Ned Batchelder | 2021-07-15 | 1 | -8/+9 |
| | | | | | | | | Fixes a few unusual issues with reports: - #580: HTML report generation fails on too long path - #584: File collisions in coverage report html - #1167: Remove leading underscore in coverage html | ||||
* | refactor: remove a now no-op function | Ned Batchelder | 2021-05-02 | 1 | -8/+1 |
| | |||||
* | refactor: move exceptions to their own module | Ned Batchelder | 2021-05-02 | 1 | -1/+2 |
| | |||||
* | refactor: pyupgrade --py36-plus coverage/*.py | Ned Batchelder | 2021-05-02 | 1 | -8/+8 |
| | |||||
* | refactor: remove code explicitly choosing between py2 and py3 | Ned Batchelder | 2021-05-01 | 1 | -16/+4 |
| | |||||
* | debug: label each matcher with its role | Ned Batchelder | 2021-04-11 | 1 | -6/+9 |
| | |||||
* | fix: make TreeMatcher right for case-sensitive worlds | Ned Batchelder | 2021-04-10 | 1 | -2/+4 |
| | |||||
* | fix: combine aliases on windows base dirs (ie: ``X:\``) (fixes: #577) | Valentin Lab | 2021-01-17 | 1 | -2/+4 |
| | | | | Signed-off-by: Valentin Lab <valentin.lab@kalysto.org> | ||||
* | Don't do vars and users in abs_file | Ned Batchelder | 2019-11-28 | 1 | -3/+2 |
| | | | | It meant file names could be incorrectly expanded. | ||||
* | Adapt to 3.9's way of reporting files using absolute paths. | Ned Batchelder | 2019-11-25 | 1 | -0/+7 |
| | |||||
* | No need for format indexes (mostly) | Ned Batchelder | 2019-09-01 | 1 | -1/+1 |
| | |||||
* | Make sure that the cache is properly filled. (25x speedup on our system that ↵ | Stephan Richter | 2019-01-28 | 1 | -2/+3 |
| | | | | | | has a large sys.path.) It is always a bad idea to reassign the cachekey during the computation. | ||||
* | Keep windows working in the face of bizarre errors | Ned Batchelder | 2018-09-09 | 1 | -1/+3 |
| | |||||
* | Move fiddly fnmatch logic into its own testable function | Ned Batchelder | 2018-09-02 | 1 | -25/+37 |
| | |||||
* | Update NOTICE link to GitHub. | Ned Batchelder | 2018-06-24 | 1 | -1/+1 |
| | |||||
* | Simplify the aliases structure | Ned Batchelder | 2018-01-23 | 1 | -4/+4 |
| | |||||
* | Ensure mapped paths use the separator of the result. #618 | Ned Batchelder | 2018-01-22 | 1 | -2/+1 |
| | |||||
* | Don't ever create HTML filenames longer than ~200 chars. Fixes #627. | Ned Batchelder | 2018-01-20 | 1 | -1/+9 |
| | |||||
* | Root is acceptable as a combining path (the manylinux tests end up with one ↵ | Ned Batchelder | 2017-10-26 | 1 | -2/+10 |
| | | | | of these) | ||||
* | Avoid a deprecation warning (from https://github.com/nedbat/coveragepy/pull/33) | Ned Batchelder | 2017-10-12 | 1 | -5/+4 |
| | |||||
* | Python3.7 removed an unneeded backslash from fnmatch.translate | Ned Batchelder | 2017-10-05 | 1 | -1/+3 |
| | |||||
* | Clarify how TreeMatcher works. | Ned Batchelder | 2017-02-20 | 1 | -9/+15 |
| | |||||
* | Don't collapse in an ascii-only file-world. #533 | Ned Batchelder | 2016-11-17 | 1 | -2/+10 |
| | |||||
* | In Python 3.6, fnmatch changed a little bit. Adapt. | Ned Batchelder | 2016-09-13 | 1 | -2/+5 |
| | |||||
* | Use unicode_filename more, and account for missing filesystemencoding | Ned Batchelder | 2015-10-25 | 1 | -3/+2 |
| | |||||
* | Properly handle filenames with non-ASCII characters. #432 | Ned Batchelder | 2015-10-25 | 1 | -5/+30 |
| | |||||
* | Protect ourselves from mock'ed os. #416 | Ned Batchelder | 2015-10-06 | 1 | -1/+3 |
| | |||||
* | Fix 'filename' to be 'file name' in English. | Ned Batchelder | 2015-08-20 | 1 | -5/+5 |
| | |||||
* | Use ntpath so Windows file manipulation can be tested the same everywhere. | Ned Batchelder | 2015-08-15 | 1 | -1/+1 |
| | |||||
* | Move flat_rootname from FileReporter to a utility function. | Ned Batchelder | 2015-08-09 | 1 | -0/+14 |
| | |||||
* | Windows fixes due to data changes | Ned Batchelder | 2015-07-26 | 1 | -1/+4 |
| | |||||
* | Get rid of napoleon style docstrings, they don't format nicely. | Ned Batchelder | 2015-07-26 | 1 | -4/+3 |
| | |||||
* | Add license mention to the top of all files. #313. | Ned Batchelder | 2015-07-24 | 1 | -0/+3 |
| | |||||
* | Be more specific with PathAliases tests. | Ned Batchelder | 2015-06-16 | 1 | -1/+3 |
| | |||||
* | Remove FileLocator from PathAliases. Now it always produces canonicalized paths. | Ned Batchelder | 2015-06-13 | 1 | -6/+5 |
| | |||||
* | Change FileLocator from a class to module-level functions | Ned Batchelder | 2015-06-13 | 1 | -42/+50 |
| | |||||
* | Tweak up the last merge | Ned Batchelder | 2015-06-07 | 1 | -0/+1 |
| | |||||
* | Correct path normalization on Windows: the drive was not normalized ↵ | Ionel Cristian Mărieș | 2015-06-06 | 1 | -1/+1 |
| | | | | | | | (different inputs like "c:\asdf" and "C:\asdf" did not return the same path). --HG-- branch : ionelmc/correct-path-normalization-on-windows-th-1433618255921 | ||||
* | Collect all the nudgy environment checks into coverage.env | Ned Batchelder | 2015-01-18 | 1 | -2/+3 |
| | |||||
* | Move python source understanding into python.py | Ned Batchelder | 2015-01-01 | 1 | -77/+1 |
| | |||||
* | Don't use %r for filenames, on windows, the backslashes go nuts. | Ned Batchelder | 2014-12-28 | 1 | -1/+1 |
| | |||||
* | Further consolidation of code reading Python source. | Ned Batchelder | 2014-12-28 | 1 | -7/+31 |
| |