summaryrefslogtreecommitdiff
path: root/tests/test_process.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2020-11-27 18:54:26 -0500
committerNed Batchelder <ned@nedbatchelder.com>2020-11-28 19:48:31 -0500
commitbf479909ee9765fa3007360c12fb3b89906645f3 (patch)
treee41609cd0d3e5cc879cd0e8595c2ac1383e52fe5 /tests/test_process.py
parentc8b9a286b343f22a3cd4dcf4906b13faea68ee96 (diff)
downloadpython-coveragepy-git-bf479909ee9765fa3007360c12fb3b89906645f3.tar.gz
Fix tests for GitHub windows platform
The tests were failing because of differences in file paths. It was comparing: C:\Users\runneradmin\AppData\... to: C:\Users\RUNNER~1\AppData\... and failing. These changes normalize the file paths so the comparisons work properly.
Diffstat (limited to 'tests/test_process.py')
-rw-r--r--tests/test_process.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index bf0e1ac0..7f772e31 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -20,7 +20,7 @@ import pytest
import coverage
from coverage import env
from coverage.data import line_counts
-from coverage.files import python_reported_file
+from coverage.files import abs_file, python_reported_file
from coverage.misc import output_encoding
from tests.coveragetest import CoverageTest, TESTS_DIR, xfail
@@ -390,8 +390,8 @@ class ProcessTest(CoverageTest):
data.read()
summary = line_counts(data, fullpath=True)
self.assertEqual(len(summary), 1)
- actual = os.path.normcase(os.path.abspath(list(summary.keys())[0]))
- expected = os.path.normcase(os.path.abspath('src/x.py'))
+ actual = abs_file(list(summary.keys())[0])
+ expected = abs_file('src/x.py')
self.assertEqual(expected, actual)
self.assertEqual(list(summary.values())[0], 6)