From 588f3789c29ebf05cfe7b69ae306a40e34f83d1a Mon Sep 17 00:00:00 2001 From: Ionel Cristian Maries Date: Sun, 7 Jun 2015 03:16:28 +0300 Subject: Add a test for the Windows issue of actual_path. --HG-- branch : ionelmc/correct-path-normalization-on-windows-th-1433618255921 --- tests/test_files.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'tests/test_files.py') diff --git a/tests/test_files.py b/tests/test_files.py index ae56e728..acf42256 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -5,13 +5,20 @@ 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): + def test_actual_path(self): + self.assertEquals(actual_path(r'c:\Windows'), actual_path(r'C:\wINDOWS')) + + class FileLocatorTest(CoverageTest): """Tests of `FileLocator`.""" -- cgit v1.2.1 From 259fae074bbae20dbb0afb3b7790ba923c12f28c Mon Sep 17 00:00:00 2001 From: Ionel Cristian Maries Date: Sun, 7 Jun 2015 03:43:33 +0300 Subject: Use TestCase here. --HG-- branch : ionelmc/correct-path-normalization-on-windows-th-1433618255921 --- tests/test_files.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/test_files.py') diff --git a/tests/test_files.py b/tests/test_files.py index acf42256..41f7b38a 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -2,6 +2,7 @@ import os import os.path +from unittest import TestCase from coverage.files import ( FileLocator, TreeMatcher, FnmatchMatcher, ModuleMatcher, PathAliases, @@ -14,7 +15,7 @@ from tests.coveragetest import CoverageTest if env.WINDOWS: - class IncompleteWindowsTest(CoverageTest): + class IncompleteWindowsTest(TestCase): def test_actual_path(self): self.assertEquals(actual_path(r'c:\Windows'), actual_path(r'C:\wINDOWS')) -- cgit v1.2.1 From 3d0e12c982ad2a96e99273d515f79db514092c85 Mon Sep 17 00:00:00 2001 From: Ionel Cristian Maries Date: Sun, 7 Jun 2015 03:48:27 +0300 Subject: Use the run_in_temp_dir flag. --HG-- branch : ionelmc/correct-path-normalization-on-windows-th-1433618255921 --- tests/test_files.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tests/test_files.py') diff --git a/tests/test_files.py b/tests/test_files.py index 41f7b38a..85c7048b 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -2,7 +2,6 @@ import os import os.path -from unittest import TestCase from coverage.files import ( FileLocator, TreeMatcher, FnmatchMatcher, ModuleMatcher, PathAliases, @@ -15,7 +14,9 @@ from tests.coveragetest import CoverageTest if env.WINDOWS: - class IncompleteWindowsTest(TestCase): + 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')) -- cgit v1.2.1