diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2015-06-07 12:01:11 -0400 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-06-07 12:01:11 -0400 |
| commit | bbb7a1a7d2c1f0d251c2b1221263e0d4f1ca7527 (patch) | |
| tree | 26b2011245ec0a9c32116342fe034f67ffed4ad9 | |
| parent | 5574a6345276abccd29ce25490cf239425c62933 (diff) | |
| download | python-coveragepy-bbb7a1a7d2c1f0d251c2b1221263e0d4f1ca7527.tar.gz | |
Tweak up the last merge
| -rw-r--r-- | coverage/files.py | 1 | ||||
| -rw-r--r-- | tests/test_files.py | 22 |
2 files changed, 15 insertions, 8 deletions
diff --git a/coverage/files.py b/coverage/files.py index 1feb9b6..a800b7a 100644 --- a/coverage/files.py +++ b/coverage/files.py @@ -64,6 +64,7 @@ if env.WINDOWS: head, tail = os.path.split(path) if not tail: + # This means head is the drive spec: normalize it. actpath = head.upper() elif not head: actpath = tail diff --git a/tests/test_files.py b/tests/test_files.py index 85c7048..cd571e0 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -13,14 +13,6 @@ 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`.""" @@ -257,3 +249,17 @@ class FindPythonFilesTest(CoverageTest): "sub/ssub/__init__.py", "sub/ssub/s.py", "sub/windows.pyw", ]) + + +class WindowsFileTest(CoverageTest): + """Windows-specific tests of file name handling.""" + + run_in_temp_dir = False + + def setUp(self): + if not env.WINDOWS: + self.skip("Only need to run Windows tests on Windows.") + super(WindowsFileTest, self).setUp() + + def test_actual_path(self): + self.assertEquals(actual_path(r'c:\Windows'), actual_path(r'C:\wINDOWS')) |
