Replace pathlib._abc.PathModuleBase.splitroot() with splitdrive() (#114065)

This allows users of the `pathlib-abc` PyPI package to use `posixpath` or
`ntpath` as a path module in versions of Python lacking
`os.path.splitroot()` (3.11 and before).
This commit is contained in:
Barney Gale 2024-01-14 23:06:04 +00:00 committed by GitHub
parent ca6cf56330
commit 4de4e654e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 11 deletions

View file

@ -27,7 +27,7 @@ class PathModuleBaseTest(unittest.TestCase):
m.sep
self.assertRaises(e, m.join, 'foo')
self.assertRaises(e, m.split, 'foo')
self.assertRaises(e, m.splitroot, 'foo')
self.assertRaises(e, m.splitdrive, 'foo')
self.assertRaises(e, m.normcase, 'foo')
self.assertRaises(e, m.isabs, 'foo')