1 |
commit: 5926ccaf1ce40b6210bed29925483e644e9192b8 |
2 |
Author: Marco Sirabella <marco <AT> sirabella <DOT> org> |
3 |
AuthorDate: Sat Apr 24 07:11:33 2021 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 24 19:53:50 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=5926ccaf |
7 |
|
8 |
tests: Remove unused assertExists helper |
9 |
|
10 |
Signed-off-by: Marco Sirabella <marco <AT> sirabella.org> |
11 |
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> |
12 |
|
13 |
lib/portage/tests/__init__.py | 16 ---------------- |
14 |
repoman/lib/repoman/tests/__init__.py | 18 +----------------- |
15 |
2 files changed, 1 insertion(+), 33 deletions(-) |
16 |
|
17 |
diff --git a/lib/portage/tests/__init__.py b/lib/portage/tests/__init__.py |
18 |
index de7e140c5..3faa15103 100644 |
19 |
--- a/lib/portage/tests/__init__.py |
20 |
+++ b/lib/portage/tests/__init__.py |
21 |
@@ -285,22 +285,6 @@ class TestCase(unittest.TestCase): |
22 |
else: excName = str(excClass) |
23 |
raise self.failureException("%s not raised: %s" % (excName, msg)) |
24 |
|
25 |
- def assertExists(self, path): |
26 |
- """Make sure |path| exists""" |
27 |
- if not os.path.exists(path): |
28 |
- msg = ['path is missing: %s' % (path,)] |
29 |
- while path != '/': |
30 |
- path = os.path.dirname(path) |
31 |
- if not path: |
32 |
- # If we're given something like "foo", abort once we get to "". |
33 |
- break |
34 |
- result = os.path.exists(path) |
35 |
- msg.append('\tos.path.exists(%s): %s' % (path, result)) |
36 |
- if result: |
37 |
- msg.append('\tcontents: %r' % os.listdir(path)) |
38 |
- break |
39 |
- raise self.failureException('\n'.join(msg)) |
40 |
- |
41 |
def assertNotExists(self, path): |
42 |
"""Make sure |path| does not exist""" |
43 |
if os.path.exists(path): |
44 |
|
45 |
diff --git a/repoman/lib/repoman/tests/__init__.py b/repoman/lib/repoman/tests/__init__.py |
46 |
index 85c6f0b54..efc233aa4 100644 |
47 |
--- a/repoman/lib/repoman/tests/__init__.py |
48 |
+++ b/repoman/lib/repoman/tests/__init__.py |
49 |
@@ -1,5 +1,5 @@ |
50 |
# tests/__init__.py -- Portage Unit Test functionality |
51 |
-# Copyright 2006-2020 Gentoo Authors |
52 |
+# Copyright 2006-2021 Gentoo Authors |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
|
55 |
import argparse |
56 |
@@ -262,22 +262,6 @@ class TestCase(unittest.TestCase): |
57 |
else: excName = str(excClass) |
58 |
raise self.failureException("%s not raised: %s" % (excName, msg)) |
59 |
|
60 |
- def assertExists(self, path): |
61 |
- """Make sure |path| exists""" |
62 |
- if not os.path.exists(path): |
63 |
- msg = ['path is missing: %s' % (path,)] |
64 |
- while path != '/': |
65 |
- path = os.path.dirname(path) |
66 |
- if not path: |
67 |
- # If we're given something like "foo", abort once we get to "". |
68 |
- break |
69 |
- result = os.path.exists(path) |
70 |
- msg.append('\tos.path.exists(%s): %s' % (path, result)) |
71 |
- if result: |
72 |
- msg.append('\tcontents: %r' % os.listdir(path)) |
73 |
- break |
74 |
- raise self.failureException('\n'.join(msg)) |
75 |
- |
76 |
def assertNotExists(self, path): |
77 |
"""Make sure |path| does not exist""" |
78 |
if os.path.exists(path): |