class WindowsPathAsPureTest(PureWindowsPathTest):
cls = pathlib.WindowsPath
- def test_owner(self):
- P = self.cls
- with self.assertRaises(pathlib.UnsupportedOperation):
- P('c:/').owner()
-
- def test_group(self):
- P = self.cls
- with self.assertRaises(pathlib.UnsupportedOperation):
- P('c:/').group()
-
#
# Tests for the virtual classes.
self.assertEqual(P.from_uri('file:' + pathname2url(r'c:\path\to\file')), P('c:/path/to/file'))
self.assertEqual(P.from_uri('file:' + pathname2url(r'\\server\path\to\file')), P('//server/path/to/file'))
+ def test_owner(self):
+ P = self.cls
+ with self.assertRaises(pathlib.UnsupportedOperation):
+ P('c:/').owner()
+
+ def test_group(self):
+ P = self.cls
+ with self.assertRaises(pathlib.UnsupportedOperation):
+ P('c:/').group()
+
class PathSubclassTest(PathTest):
class cls(pathlib.Path):