mirror of
https://github.com/python/cpython.git
synced 2025-10-06 23:21:06 +00:00
Issue #20589: Fix test_pathlib
This commit is contained in:
parent
eb2e02bed4
commit
d7569637b5
1 changed files with 10 additions and 10 deletions
|
@ -1156,16 +1156,6 @@ class PureWindowsPathTest(_BasePurePathTest, unittest.TestCase):
|
|||
# UNC paths are never reserved
|
||||
self.assertIs(False, P('//my/share/nul/con/aux').is_reserved())
|
||||
|
||||
def test_owner(self):
|
||||
P = self.cls
|
||||
with self.assertRaises(NotImplementedError):
|
||||
P('c:/').owner()
|
||||
|
||||
def test_group(self):
|
||||
P = self.cls
|
||||
with self.assertRaises(NotImplementedError):
|
||||
P('c:/').group()
|
||||
|
||||
class PurePathTest(_BasePurePathTest, unittest.TestCase):
|
||||
cls = pathlib.PurePath
|
||||
|
||||
|
@ -1229,6 +1219,16 @@ class PosixPathAsPureTest(PurePosixPathTest):
|
|||
class WindowsPathAsPureTest(PureWindowsPathTest):
|
||||
cls = pathlib.WindowsPath
|
||||
|
||||
def test_owner(self):
|
||||
P = self.cls
|
||||
with self.assertRaises(NotImplementedError):
|
||||
P('c:/').owner()
|
||||
|
||||
def test_group(self):
|
||||
P = self.cls
|
||||
with self.assertRaises(NotImplementedError):
|
||||
P('c:/').group()
|
||||
|
||||
|
||||
class _BasePathTest(object):
|
||||
"""Tests for the FS-accessing functionalities of the Path classes."""
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue