mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GH-110109: Fix misplaced tests for pathlib.WindowsPath.owner()
and group()
(#112239)
Move test methods from `WindowsPathAsPureTest` to `WindowsPathTest` unit. The former test unit is intended to exercise only pure path functionality.
This commit is contained in:
parent
91d1730541
commit
9c7c8bacc1
1 changed files with 10 additions and 10 deletions
|
@ -1577,16 +1577,6 @@ class PosixPathAsPureTest(PurePosixPathTest):
|
|||
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.
|
||||
|
@ -3738,6 +3728,16 @@ class WindowsPathTest(PathTest):
|
|||
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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue