]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/functional/ppc/test_amiga: Fix issues reported by pylint and flake8
authorThomas Huth <thuth@redhat.com>
Wed, 19 Nov 2025 08:26:30 +0000 (09:26 +0100)
committerThomas Huth <thuth@redhat.com>
Fri, 21 Nov 2025 07:33:15 +0000 (08:33 +0100)
Pylint complains about unused variable "tar_name" and a missing "check"
for subprocess.run(), and flake8 suggest a second empty line after the
class. While we're at it, also remove the unused "timeout" class variable
(that was only necessary for the avocado framework which we don't use
anymore).

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-ID: <20251119082636.43286-10-thuth@redhat.com>

tests/functional/ppc/test_amiga.py

index 8600e2e9633a382fd421b6b5548f3b113e04df19..36378fb6972067da4ee1d4fd1c98da529e9d115d 100755 (executable)
@@ -15,8 +15,6 @@ from qemu_test import wait_for_console_pattern
 
 class AmigaOneMachine(QemuSystemTest):
 
-    timeout = 90
-
     ASSET_IMAGE = Asset(
         ('https://www.hyperion-entertainment.com/index.php/'
          'downloads?view=download&format=raw&file=25'),
@@ -25,19 +23,19 @@ class AmigaOneMachine(QemuSystemTest):
     def test_ppc_amigaone(self):
         self.require_accelerator("tcg")
         self.set_machine('amigaone')
-        tar_name = 'A1Firmware_Floppy_05-Mar-2005.zip'
         self.archive_extract(self.ASSET_IMAGE, format="zip")
         bios = self.scratch_file("u-boot-amigaone.bin")
         with open(bios, "wb") as bios_fh:
             subprocess.run(['tail', '-c', '524288',
                             self.scratch_file("floppy_edition",
                                               "updater.image")],
-                           stdout=bios_fh)
+                           stdout=bios_fh, check=True)
 
         self.vm.set_console()
         self.vm.add_args('-bios', bios)
         self.vm.launch()
         wait_for_console_pattern(self, 'FLASH:')
 
+
 if __name__ == '__main__':
     QemuSystemTest.main()