Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-110109: Fix misplaced tests for pathlib.WindowsPath.owner() and group() #112239

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Lib/test/test_pathlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -3738,6 +3728,16 @@ def test_from_uri_pathname2url(self):
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):
Expand Down
Loading