Skip to content

Commit 7faa803

Browse files
committed
✅ Normalize path for case-insensitive string comparison on Windows
1 parent eb990f9 commit 7faa803

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

zcollection/tests/test_fs_utils.py

+4
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ def istrcmp(str1, str2):
120120
if platform.system() == 'Windows':
121121
str1 = str1.replace('\\', '/')
122122
str2 = str2.replace('\\', '/')
123+
if str1.endswith(':'):
124+
str1 += '/'
125+
if str2.endswith(':'):
126+
str2 += '/'
123127
return str1.lower() == str2.lower()
124128

125129
assert istrcmp(fs_utils.normalize_path(fs, '/'), root)

0 commit comments

Comments
 (0)