mirror of
https://github.com/python/cpython.git
synced 2025-10-27 11:44:39 +00:00
GH-127381: pathlib ABCs: remove PathBase.cwd() and home() (#127427)
These classmethods presume that the user has retained the original `__init__()` signature, which may not be the case. Also, many virtual filesystems don't provide current or home directories.
This commit is contained in:
parent
4e0a4cafe8
commit
328187cc4f
3 changed files with 17 additions and 17 deletions
|
|
@ -1371,9 +1371,7 @@ def test_unsupported_operation(self):
|
|||
self.assertRaises(e, p.rglob, '*')
|
||||
self.assertRaises(e, lambda: list(p.walk()))
|
||||
self.assertRaises(e, p.absolute)
|
||||
self.assertRaises(e, P.cwd)
|
||||
self.assertRaises(e, p.expanduser)
|
||||
self.assertRaises(e, p.home)
|
||||
self.assertRaises(e, p.readlink)
|
||||
self.assertRaises(e, p.symlink_to, 'foo')
|
||||
self.assertRaises(e, p.hardlink_to, 'foo')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue