From 5072f118a377a82fafd41a3135ad628489aa9798 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20BRIOL?= Date: Sat, 10 Feb 2024 12:56:50 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Normalize=20path=20for=20case-insen?= =?UTF-8?q?sitive=20string=20comparison=20on=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zcollection/tests/test_fs_utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zcollection/tests/test_fs_utils.py b/zcollection/tests/test_fs_utils.py index 8093021..409a82c 100644 --- a/zcollection/tests/test_fs_utils.py +++ b/zcollection/tests/test_fs_utils.py @@ -117,6 +117,9 @@ def test_normalize_path() -> None: def istrcmp(str1, str2): """Case insensitive string comparison.""" + if platform.system() == 'Windows': + str1 = str1.replace('\\', '/') + str2 = str2.replace('\\', '/') return str1.lower() == str2.lower() assert istrcmp(fs_utils.normalize_path(fs, '/'), root)