diff --git a/bin/fail2ban-testcases b/bin/fail2ban-testcases index 3b18b7c27..7d1220391 100755 --- a/bin/fail2ban-testcases +++ b/bin/fail2ban-testcases @@ -122,7 +122,7 @@ if verbosity > 1: # pragma: no cover if verbosity > 3: fmt = ' | %(module)15.15s-%(levelno)-2d: %(funcName)-20.20s |' + fmt if verbosity > 2: - fmt = ' +%(relativeCreated)5d %(thread)X %(levelname)-5.5s' + fmt + fmt = ' +%(relativeCreated)5d %(thread)X %(levelname)-5.5s' + fmt else: fmt = ' %(asctime)-15s %(thread)X %(levelname)-5.5s' + fmt # @@ -134,7 +134,7 @@ logSys.addHandler(stdout) # if not opts.log_level or opts.log_level != 'critical': # pragma: no cover print("Fail2ban %s test suite. Python %s. Please wait..." \ - % (version, str(sys.version).replace('\n', ''))) + % (version, str(sys.version).replace('\n', ''))) tests = gatherTests(regexps, opts) # diff --git a/fail2ban/tests/utils.py b/fail2ban/tests/utils.py index be8ce015a..2d5a38f79 100644 --- a/fail2ban/tests/utils.py +++ b/fail2ban/tests/utils.py @@ -418,9 +418,6 @@ class LogCaptureTestCase(unittest.TestCase): def pruneLog(self): self._log.truncate(0) - def pruneLog(self): - self._log.truncate(0) - def getLog(self): return self._log.getvalue()