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é <philmd@linaro.org> Reviewed-by: Glenn Miles <milesg@linux.ibm.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20251119082636.43286-11-thuth@redhat.com>
This commit is contained in:
parent
5560bad695
commit
dffd646ae6
1 changed files with 7 additions and 7 deletions
|
|
@ -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("<test completed>")
|
||||
return True
|
||||
else:
|
||||
if "NIP fff80200" not in output:
|
||||
self.log.info("<test not completed>")
|
||||
return False
|
||||
|
||||
self.log.info("<test completed>")
|
||||
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!")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue