[Python-checkins] cpython: Remove duplicate method in test_pathlib. Initial patch by Navneet Suman.

ezio.melotti python-checkins at python.org
Mon Dec 28 16:50:27 EST 2015


https://hg.python.org/cpython/rev/1472c08d9c23
changeset:   99696:1472c08d9c23
user:        Ezio Melotti <ezio.melotti at gmail.com>
date:        Mon Dec 28 23:50:19 2015 +0200
summary:
  Remove duplicate method in test_pathlib.  Initial patch by Navneet Suman.

files:
  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
--- a/Lib/test/test_pathlib.py
+++ b/Lib/test/test_pathlib.py
@@ -1437,13 +1437,13 @@
         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):
+
+    def _check_resolve(self, p, expected):
         q = p.resolve()
         self.assertEqual(q, expected)
 
-    def _check_resolve_absolute(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):

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list