summaryrefslogtreecommitdiff
path: root/Lib/test/test_pathlib.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2016-02-11 13:12:19 +0200
committerSerhiy Storchaka <storchaka@gmail.com>2016-02-11 13:12:19 +0200
commit20ac73fb7133c119974eb21693d2621b09585ca0 (patch)
treec5cb3670b54a783d3a4328c5b189669c737ca594 /Lib/test/test_pathlib.py
parentc2154d6c07cab7d173204a5f157aea44175be7a0 (diff)
parent2b442f7d5b61dcefc5a7a18a6e7af9de5983790c (diff)
downloadcpython-20ac73fb7133c119974eb21693d2621b09585ca0.tar.gz
Issue #26325: Added test.support.check_no_resource_warning() to check that
no ResourceWarning is emitted.
Diffstat (limited to 'Lib/test/test_pathlib.py')
-rw-r--r--Lib/test/test_pathlib.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_pathlib.py b/Lib/test/test_pathlib.py
index b03fee018f..9a98d46c4e 100644
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
@@ -1492,14 +1492,14 @@ class _BasePathTest(object):
self.assertEqual(set(p.glob("dirA/../file*")), { P(BASE, "dirA/../fileA") })
self.assertEqual(set(p.glob("../xyzzy")), set())
- def _check_resolve_relative(self, p, expected):
- q = p.resolve()
- self.assertEqual(q, expected)
- def _check_resolve_absolute(self, p, expected):
+ def _check_resolve(self, p, expected):
q = p.resolve()
self.assertEqual(q, expected)
+ # this can be used to check both relative and absolute resolutions
+ _check_resolve_relative = _check_resolve_absolute = _check_resolve
+
@with_symlinks
def test_resolve_common(self):
P = self.cls