Reviewed-by: Glenn Miles <[email protected]>

Thanks,

Glenn

On Wed, 2025-11-19 at 09:26 +0100, Thomas Huth wrote:
> From: Thomas Huth <[email protected]>
> 
> Pylint suggests to write some parts of the code in a slightly different
> way ... thus rework the code to make the linter happy.
> 
> Signed-off-by: Thomas Huth <[email protected]>
> ---
>  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 26bbe11b2d3..7b360a40a54 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 @@ def _test_completed(self):
>              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 @@ def _wait_pass_fail(self, timeout):
>  
>                  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!")


Reply via email to