diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-02-11 13:12:19 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-02-11 13:12:19 +0200 |
commit | 20ac73fb7133c119974eb21693d2621b09585ca0 (patch) | |
tree | c5cb3670b54a783d3a4328c5b189669c737ca594 /Lib/test/test_pathlib.py | |
parent | c2154d6c07cab7d173204a5f157aea44175be7a0 (diff) | |
parent | 2b442f7d5b61dcefc5a7a18a6e7af9de5983790c (diff) | |
download | cpython-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.py | 8 |
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 |