diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/pathlib.py | 6 | ||||
-rw-r--r-- | Lib/test/test_pathlib.py | 9 |
2 files changed, 15 insertions, 0 deletions
diff --git a/Lib/pathlib.py b/Lib/pathlib.py index 5169ff5..ed31ddb 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -1425,3 +1425,9 @@ class PosixPath(Path, PurePosixPath): class WindowsPath(Path, PureWindowsPath): __slots__ = () + + def owner(self): + raise NotImplementedError("Path.owner() is unsupported on this system") + + def group(self): + raise NotImplementedError("Path.group() is unsupported on this system") diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py index 9a98d46..451e41f 100644 --- a/Lib/test/test_pathlib.py +++ b/Lib/test/test_pathlib.py @@ -1156,6 +1156,15 @@ 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 |