diff options
author | Ned Batchelder <nedbat@gmail.com> | 2015-06-07 11:49:22 -0400 |
---|---|---|
committer | Ned Batchelder <nedbat@gmail.com> | 2015-06-07 11:49:22 -0400 |
commit | 2d647923dcb92a1f6237c4c20d9e23684021eba6 (patch) | |
tree | 8eebe4cbc9fbd18df7e45e18f57f23c7e23da7ce | |
parent | e08c3ea24a304ba4ddd7522a5ea134733d37d383 (diff) | |
parent | 3d0e12c982ad2a96e99273d515f79db514092c85 (diff) | |
download | python-coveragepy-git-2d647923dcb92a1f6237c4c20d9e23684021eba6.tar.gz |
Merged in ionelmc/coveragepy/ionelmc/correct-path-normalization-on-windows-th-1433618255921 (pull request #54)
Correct path normalization on Windows
-rw-r--r-- | coverage/files.py | 2 | ||||
-rw-r--r-- | tests/test_files.py | 11 | ||||
-rw-r--r-- | tox.ini | 2 |
3 files changed, 12 insertions, 3 deletions
diff --git a/coverage/files.py b/coverage/files.py index f7fc9693..1feb9b68 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -64,7 +64,7 @@ if env.WINDOWS: head, tail = os.path.split(path) if not tail: - actpath = head + actpath = head.upper() elif not head: actpath = tail else: diff --git a/tests/test_files.py b/tests/test_files.py index ae56e728..85c7048b 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -5,13 +5,22 @@ import os.path from coverage.files import ( FileLocator, TreeMatcher, FnmatchMatcher, ModuleMatcher, PathAliases, - find_python_files, abs_file + find_python_files, abs_file, actual_path ) from coverage.misc import CoverageException +from coverage import env from tests.coveragetest import CoverageTest +if env.WINDOWS: + class IncompleteWindowsTest(CoverageTest): + run_in_temp_dir = False + + def test_actual_path(self): + self.assertEquals(actual_path(r'c:\Windows'), actual_path(r'C:\wINDOWS')) + + class FileLocatorTest(CoverageTest): """Tests of `FileLocator`.""" @@ -22,7 +22,7 @@ commands = # Build the C extension and test with the CTracer {envpython} setup.py --quiet build_ext --inplace {envpython} igor.py test_with_tracer c {posargs} - +passenv = * deps = nose mock |