summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pathlib/test_pathlib.py
diff options
context:
space:
mode:
authorBarney Gale <barney.gale@gmail.com>2024-01-05 22:56:04 (GMT)
committerGitHub <noreply@github.com>2024-01-05 22:56:04 (GMT)
commit3375dfed400494ba5cc1b744d52f6fb8b7796059 (patch)
tree124c0f4c37fc40590b75e5fb5c8ef43da393298b /Lib/test/test_pathlib/test_pathlib.py
parentd99d8712253c3affc54cf7f6e71f161dea8347ce (diff)
downloadcpython-3375dfed400494ba5cc1b744d52f6fb8b7796059.zip
cpython-3375dfed400494ba5cc1b744d52f6fb8b7796059.tar.gz
cpython-3375dfed400494ba5cc1b744d52f6fb8b7796059.tar.bz2
GH-113568: Stop raising deprecation warnings from pathlib ABCs (#113757)
Diffstat (limited to 'Lib/test/test_pathlib/test_pathlib.py')
-rw-r--r--Lib/test/test_pathlib/test_pathlib.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_pathlib/test_pathlib.py b/Lib/test/test_pathlib/test_pathlib.py
index b64e6b5..93fe327 100644
--- a/Lib/test/test_pathlib/test_pathlib.py
+++ b/Lib/test/test_pathlib/test_pathlib.py
@@ -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