summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pathlib.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-05-16 22:35:44 (GMT)
committerGitHub <noreply@github.com>2021-05-16 22:35:44 (GMT)
commitb913f47e87f788e705716ae037ee9f68b4265e69 (patch)
treece4edab457c4e726ea4f330d85a20cc831edad6d /Lib/test/test_pathlib.py
parent68b79f75c535724eb526ed68ad7a73c8cb7956b1 (diff)
downloadcpython-b913f47e87f788e705716ae037ee9f68b4265e69.zip
cpython-b913f47e87f788e705716ae037ee9f68b4265e69.tar.gz
cpython-b913f47e87f788e705716ae037ee9f68b4265e69.tar.bz2
bpo-39950: Fix deprecation warning in test for `pathlib.Path.link_to()` (GH-26155) (GH-26178)
(cherry picked from commit 1a08c5ac49b748d5e4e4b508d22d3804e3cd4dcc) Co-authored-by: Barney Gale <barney.gale@gmail.com>
Diffstat (limited to 'Lib/test/test_pathlib.py')
-rw-r--r--Lib/test/test_pathlib.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
index 6ed08f7..55d63d5 100644
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
@@ -1934,7 +1934,8 @@ class _BasePathTest(object):
self.assertTrue(p.stat)
# Linking to a str of a relative path.
r = rel_join('fileAAA')
- q.link_to(r)
+ with self.assertWarns(DeprecationWarning):
+ q.link_to(r)
self.assertEqual(os.stat(r).st_size, size)
self.assertTrue(q.stat)