summary refs log tree commit diff stats
path: root/tests/functional/qemu_test/testcase.py
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2025-02-28 10:27:33 +0000
committerThomas Huth <thuth@redhat.com>2025-03-06 08:10:04 +0100
commit8188356a260ca0201c42d128d8fa86f40160b513 (patch)
tree657cdde7e060753fd3dd95e08088f6869b4ecebe /tests/functional/qemu_test/testcase.py
parent6c5a1467f8d0a9e840c8aa193bc110cc76ee80e8 (diff)
downloadfocaccia-qemu-8188356a260ca0201c42d128d8fa86f40160b513.tar.gz
focaccia-qemu-8188356a260ca0201c42d128d8fa86f40160b513.zip
tests/functional: set 'qemu_bin' as an object level field
The 'qemu_bin' field is currently set on the class, despite being
accessed as if it were an object instance field with 'self.qemu_bin'.

This is no obvious need to have it as a class field, so move it into
the object instance.

Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250228102738.3064045-3-berrange@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/functional/qemu_test/testcase.py')
-rw-r--r--tests/functional/qemu_test/testcase.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index 9d5611c4d7..058bf270ec 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -33,7 +33,6 @@ from .uncompress import uncompress
 
 class QemuBaseTest(unittest.TestCase):
 
-    qemu_bin = os.getenv('QEMU_TEST_QEMU_BINARY')
     arch = None
 
     workdir = None
@@ -193,6 +192,7 @@ class QemuBaseTest(unittest.TestCase):
         return True
 
     def setUp(self):
+        self.qemu_bin = os.getenv('QEMU_TEST_QEMU_BINARY')
         self.assertIsNotNone(self.qemu_bin, 'QEMU_TEST_QEMU_BINARY must be set')
         self.arch = self.qemu_bin.split('-')[-1]
         self.socketdir = None