From 2b07913326f7eaff53776b4b1c9f5bef4e816168 Mon Sep 17 00:00:00 2001 From: Ayaz Salikhov Date: Sun, 20 Oct 2024 14:32:06 +0100 Subject: [PATCH] Expect warnings/errors when no_warnings/no_errors is False --- tests/conftest.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/conftest.py b/tests/conftest.py index a151eb6b83..1df04b6088 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -116,10 +116,8 @@ def run_and_wait( logs = running_container.logs().decode("utf-8") assert isinstance(logs, str) LOGGER.debug(logs) - if no_warnings: - assert not self.get_warnings(logs) - if no_errors: - assert not self.get_errors(logs) + assert no_warnings == (not self.get_warnings(logs)) + assert no_errors == (not self.get_errors(logs)) assert no_failure == (rv["StatusCode"] == 0) return logs