diff --git a/fail2ban/tests/utils.py b/fail2ban/tests/utils.py index 02f417c8..ea051872 100644 --- a/fail2ban/tests/utils.py +++ b/fail2ban/tests/utils.py @@ -330,6 +330,11 @@ def gatherTests(regexps=None, opts=None): def addTest(self, suite): matched = [] for test in suite: + # test of suite loaded with loadTestsFromName may be a suite self: + if isinstance(test, unittest.TestSuite): # pragma: no cover + self.addTest(test) + continue + # filter by regexp: s = str(test) for r in self._regexps: m = r.search(s)