Commit d7569637 authored by Victor Stinner's avatar Victor Stinner

Issue #20589: Fix test_pathlib

parent eb2e02be
...@@ -1156,16 +1156,6 @@ class PureWindowsPathTest(_BasePurePathTest, unittest.TestCase): ...@@ -1156,16 +1156,6 @@ class PureWindowsPathTest(_BasePurePathTest, unittest.TestCase):
# UNC paths are never reserved # UNC paths are never reserved
self.assertIs(False, P('//my/share/nul/con/aux').is_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): class PurePathTest(_BasePurePathTest, unittest.TestCase):
cls = pathlib.PurePath cls = pathlib.PurePath
...@@ -1229,6 +1219,16 @@ class PosixPathAsPureTest(PurePosixPathTest): ...@@ -1229,6 +1219,16 @@ class PosixPathAsPureTest(PurePosixPathTest):
class WindowsPathAsPureTest(PureWindowsPathTest): class WindowsPathAsPureTest(PureWindowsPathTest):
cls = pathlib.WindowsPath 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): class _BasePathTest(object):
"""Tests for the FS-accessing functionalities of the Path classes.""" """Tests for the FS-accessing functionalities of the Path classes."""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment