From dffd646ae615c8680fb85baef425c67133132e95 Mon Sep 17 00:00:00 2001 From: Thomas Huth Date: Wed, 19 Nov 2025 09:26:31 +0100 Subject: [PATCH] tests/functional/ppc/test_ppe42: Fix style issues reported by pylint MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Pylint suggests to write some parts of the code in a slightly different way ... thus rework the code to make the linter happy. Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Glenn Miles Signed-off-by: Thomas Huth Message-ID: <20251119082636.43286-11-thuth@redhat.com> --- tests/functional/ppc/test_ppe42.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/functional/ppc/test_ppe42.py b/tests/functional/ppc/test_ppe42.py index 26bbe11b2d..7b360a40a5 100644 --- a/tests/functional/ppc/test_ppe42.py +++ b/tests/functional/ppc/test_ppe42.py @@ -6,8 +6,9 @@ # # SPDX-License-Identifier: GPL-2.0-or-later -from qemu_test import QemuSystemTest, Asset import asyncio +from qemu_test import QemuSystemTest, Asset + class Ppe42Machine(QemuSystemTest): @@ -30,13 +31,13 @@ class Ppe42Machine(QemuSystemTest): raise self.log.info(output) - if "NIP fff80200" in output: - self.log.info("") - return True - else: + if "NIP fff80200" not in output: self.log.info("") return False + self.log.info("") + return True + def _wait_pass_fail(self, timeout): while not self._test_completed(): if timeout >= self.poll_period: @@ -49,14 +50,13 @@ class Ppe42Machine(QemuSystemTest): except asyncio.TimeoutError: self.log.info("Poll period ended.") - pass except Exception as err: self.log.debug(f"event_wait() failed due to {err=}," " {type(err)=}") raise - if e != None: + if e is not None: self.log.debug(f"Execution stopped: {e}") self.log.debug("Exiting due to test failure") self.fail("Failure detected!") -- 2.47.3