commit:     5926ccaf1ce40b6210bed29925483e644e9192b8
Author:     Marco Sirabella <marco <AT> sirabella <DOT> org>
AuthorDate: Sat Apr 24 07:11:33 2021 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Apr 24 19:53:50 2021 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=5926ccaf

tests: Remove unused assertExists helper

Signed-off-by: Marco Sirabella <marco <AT> sirabella.org>
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/tests/__init__.py         | 16 ----------------
 repoman/lib/repoman/tests/__init__.py | 18 +-----------------
 2 files changed, 1 insertion(+), 33 deletions(-)

diff --git a/lib/portage/tests/__init__.py b/lib/portage/tests/__init__.py
index de7e140c5..3faa15103 100644
--- a/lib/portage/tests/__init__.py
+++ b/lib/portage/tests/__init__.py
@@ -285,22 +285,6 @@ class TestCase(unittest.TestCase):
                        else: excName = str(excClass)
                        raise self.failureException("%s not raised: %s" % 
(excName, msg))
 
-       def assertExists(self, path):
-               """Make sure |path| exists"""
-               if not os.path.exists(path):
-                       msg = ['path is missing: %s' % (path,)]
-                       while path != '/':
-                               path = os.path.dirname(path)
-                               if not path:
-                                       # If we're given something like "foo", 
abort once we get to "".
-                                       break
-                               result = os.path.exists(path)
-                               msg.append('\tos.path.exists(%s): %s' % (path, 
result))
-                               if result:
-                                       msg.append('\tcontents: %r' % 
os.listdir(path))
-                                       break
-                       raise self.failureException('\n'.join(msg))
-
        def assertNotExists(self, path):
                """Make sure |path| does not exist"""
                if os.path.exists(path):

diff --git a/repoman/lib/repoman/tests/__init__.py 
b/repoman/lib/repoman/tests/__init__.py
index 85c6f0b54..efc233aa4 100644
--- a/repoman/lib/repoman/tests/__init__.py
+++ b/repoman/lib/repoman/tests/__init__.py
@@ -1,5 +1,5 @@
 # tests/__init__.py -- Portage Unit Test functionality
-# Copyright 2006-2020 Gentoo Authors
+# Copyright 2006-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 import argparse
@@ -262,22 +262,6 @@ class TestCase(unittest.TestCase):
                        else: excName = str(excClass)
                        raise self.failureException("%s not raised: %s" % 
(excName, msg))
 
-       def assertExists(self, path):
-               """Make sure |path| exists"""
-               if not os.path.exists(path):
-                       msg = ['path is missing: %s' % (path,)]
-                       while path != '/':
-                               path = os.path.dirname(path)
-                               if not path:
-                                       # If we're given something like "foo", 
abort once we get to "".
-                                       break
-                               result = os.path.exists(path)
-                               msg.append('\tos.path.exists(%s): %s' % (path, 
result))
-                               if result:
-                                       msg.append('\tcontents: %r' % 
os.listdir(path))
-                                       break
-                       raise self.failureException('\n'.join(msg))
-
        def assertNotExists(self, path):
                """Make sure |path| does not exist"""
                if os.path.exists(path):

Reply via email to