GH-104947: Make pathlib.PureWindowsPath comparisons consistent across platforms (GH-104948)

Use `str.lower()` rather than `ntpath.normcase()` to normalize case of
Windows paths. This restores behaviour from Python 3.11.

Co-authored-by: Gregory P. Smith <greg@krypto.org>
This commit is contained in:
Barney Gale 2023-05-26 19:04:02 +01:00 committed by GitHub
parent 060277d96b
commit ad0be361c9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View file

@ -904,6 +904,7 @@ def test_eq(self):
self.assertEqual(P('a/B'), P('A/b'))
self.assertEqual(P('C:a/B'), P('c:A/b'))
self.assertEqual(P('//Some/SHARE/a/B'), P('//somE/share/A/b'))
self.assertEqual(P('\u0130'), P('i\u0307'))
def test_as_uri(self):
P = self.cls