We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56436f2 commit 5a3f14dCopy full SHA for 5a3f14d
test/test_files.py
@@ -39,9 +39,13 @@ def test_peer_directories(self):
39
40
def test_filepath_contains_absolute_prefix_twice(self):
41
# https://bitbucket.org/ned/coveragepy/issue/194/filelocatorrelative_filename-could-mangle
42
+ # Build a path that has two pieces matching the absolute path prefix.
43
+ # Technically, this test doesn't do that on Windows, but drive
44
+ # letters make that impractical to acheive.
45
fl = FileLocator()
46
d = fl.abs_file(os.curdir)
- rel = os.path.join('sub', d.lstrip(os.path.sep), 'file1.py')
47
+ trick = os.path.splitdrive(d)[1].lstrip(os.path.sep)
48
+ rel = os.path.join('sub', trick, 'file1.py')
49
self.assertEqual(fl.relative_filename(fl.abs_file(rel)), rel)
50
51
0 commit comments