]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
tests/functional: remove all class level fields
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 17 Mar 2025 12:43:00 +0000 (12:43 +0000)
committerThomas Huth <thuth@redhat.com>
Wed, 19 Mar 2025 06:41:32 +0000 (07:41 +0100)
A number of fields are set at the class level on QemuBaseTest, even
though the exact same named field is then set at the object level
later in most cases.

The 'self.logger' initialization in ACPI bits test needs to be removed
since 'self.log' won't exist at that point in the flow. It already
initialized 'self.logger' later in the setUp() method, so the __init__
method was redundant.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Message-ID: <20250317124300.84266-1-berrange@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/functional/qemu_test/testcase.py
tests/functional/test_acpi_bits.py

index 50d232a7c63756850a71c518aadb198907ed75af..50c401b8c3c3de758d1f4459574ce938a0da0901 100644 (file)
@@ -33,12 +33,6 @@ from .uncompress import uncompress
 
 class QemuBaseTest(unittest.TestCase):
 
-    arch = None
-
-    workdir = None
-    log = None
-    logdir = None
-
     '''
     @params compressed: filename, Asset, or file-like object to uncompress
     @params format: optional compression format (gzip, lzma)
index 20da4356873f25fb4d608b21d6f100005705830a..8e0563a97b18c53a6e6d51e2bc930f9bbd284e81 100755 (executable)
@@ -119,7 +119,6 @@ class AcpiBitsTest(QemuSystemTest): #pylint: disable=too-many-instance-attribute
 
         self._debugcon_addr = '0x403'
         self._debugcon_log = 'debugcon-log.txt'
-        self.logger = self.log
 
     def _print_log(self, log):
         self.logger.info('\nlogs from biosbits follows:')