GH-113568: Stop raising deprecation warnings from pathlib ABCs (#113757)

This commit is contained in:
Barney Gale 2024-01-05 22:56:04 +00:00 committed by GitHub
parent d99d871225
commit 3375dfed40
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 46 additions and 24 deletions

View file

@ -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