mirror of
https://github.com/python/cpython.git
synced 2025-08-27 04:05:34 +00:00
bpo-38994: Implement __class_getitem__ for PathLike (GH-17498)
https://bugs.python.org/issue38994
This commit is contained in:
parent
cd90a52983
commit
526606baf7
5 changed files with 13 additions and 0 deletions
|
@ -2217,6 +2217,9 @@ class _BasePathTest(object):
|
|||
class PathTest(_BasePathTest, unittest.TestCase):
|
||||
cls = pathlib.Path
|
||||
|
||||
def test_class_getitem(self):
|
||||
self.assertIs(self.cls[str], self.cls)
|
||||
|
||||
def test_concrete_class(self):
|
||||
p = self.cls('a')
|
||||
self.assertIs(type(p),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue