From: Thomas Huth Date: Wed, 19 Nov 2025 08:26:31 +0000 (+0100) Subject: tests/functional/ppc/test_ppe42: Fix style issues reported by pylint X-Git-Tag: v10.2.0-rc2~14^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dffd646ae615c8680fb85baef425c67133132e95;p=thirdparty%2Fqemu.git tests/functional/ppc/test_ppe42: Fix style issues reported by pylint 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> --- 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!")