mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
GH-113568: Stop raising deprecation warnings from pathlib ABCs (#113757)
This commit is contained in:
parent
d99d871225
commit
3375dfed40
5 changed files with 46 additions and 24 deletions
|
@ -214,6 +214,19 @@ class PurePathTest(test_pathlib_abc.DummyPurePathTest):
|
|||
self.assertEqual(q, p)
|
||||
self.assertEqual(repr(q), r)
|
||||
|
||||
def test_relative_to_several_args(self):
|
||||
P = self.cls
|
||||
p = P('a/b')
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
p.relative_to('a', 'b')
|
||||
p.relative_to('a', 'b', walk_up=True)
|
||||
|
||||
def test_is_relative_to_several_args(self):
|
||||
P = self.cls
|
||||
p = P('a/b')
|
||||
with self.assertWarns(DeprecationWarning):
|
||||
p.is_relative_to('a', 'b')
|
||||
|
||||
|
||||
class PurePosixPathTest(PurePathTest):
|
||||
cls = pathlib.PurePosixPath
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue