From 90527498bc08d38827672299783018051cc1564b Mon Sep 17 00:00:00 2001 From: Christian Decker Date: Mon, 8 Jan 2018 17:14:12 +0100 Subject: [PATCH] pytest: Do not re-print logs if we failed to find a log entry CI always runs with TEST_DEBUG=1 which prints logs anyway, and testing locally should also be done this way, combined with pytest which captures the logs. No need to duplicate the functionality of pytest. Signed-off-by: Christian Decker --- tests/utils.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tests/utils.py b/tests/utils.py index 3f21c8e73..1fa0c9959 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -121,7 +121,6 @@ class TailableProc(object): starting from last of the previous waited-for log entries (if any). We fail if the timeout is exceeded or if the underlying process exits before all the `regexs` were found. - """ logging.debug("Waiting for {} in the logs".format(regexs)) exs = [re.compile(r) for r in regexs] @@ -131,9 +130,6 @@ class TailableProc(object): while True: if time.time() > start_time + timeout: print("Can't find {} in logs".format(exs)) - with self.logs_cond: - for i in range(initial_pos, len(self.logs)): - print(" " + self.logs[i]) for r in exs: if self.is_in_log(r): print("({} was previously in logs!)".format(r))