mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
GH-127807: pathlib ABCs: remove PathBase._unsupported_msg()
(#127855)
This method helped us customise the `UnsupportedOperation` message depending on the type. But we're aiming to make `PathBase` a proper ABC soon, so `NotImplementedError` is the right exception to raise there.
This commit is contained in:
parent
487fdbed40
commit
7146f18946
5 changed files with 52 additions and 44 deletions
|
@ -63,6 +63,14 @@ def needs_symlinks(fn):
|
|||
_tests_needing_symlinks.add(fn.__name__)
|
||||
return fn
|
||||
|
||||
|
||||
|
||||
class UnsupportedOperationTest(unittest.TestCase):
|
||||
def test_is_notimplemented(self):
|
||||
self.assertTrue(issubclass(pathlib.UnsupportedOperation, NotImplementedError))
|
||||
self.assertTrue(isinstance(pathlib.UnsupportedOperation(), NotImplementedError))
|
||||
|
||||
|
||||
#
|
||||
# Tests for the pure classes.
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue