aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Romero <gustavo.romero@linaro.org>2025-08-19 14:39:15 +0000
committerThomas Huth <thuth@redhat.com>2025-08-27 09:46:55 +0200
commit0ac3c314130eff8e3ea9860fe3202908a7746225 (patch)
treed67141720ca0018277d663a6122eaab1f8c3e929
parent45d34fa8a4f7fed96f7fbf2ae42b33382bf25d0d (diff)
downloadqemu-0ac3c314130eff8e3ea9860fe3202908a7746225.zip
qemu-0ac3c314130eff8e3ea9860fe3202908a7746225.tar.gz
qemu-0ac3c314130eff8e3ea9860fe3202908a7746225.tar.bz2
tests/functional: Mark main in QemuBaseTest class as a static method
The main() method in the QemuBaseTest class has no parameters but is defined as a regular method. Currently, this does not cause any issues because in the functional tests main() is always called directly from QemuBaseTest (never from instances), but the way this method is defined makes its signature wrong, implying a 'self'. Hence, it's best practice to define such a method as a static method, so decorate it with @staticmethod. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org> Message-ID: <20250819143916.4138035-4-gustavo.romero@linaro.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
-rw-r--r--tests/functional/qemu_test/testcase.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index 5caf7b1..fbeb171 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -235,6 +235,7 @@ class QemuBaseTest(unittest.TestCase):
self.log.removeHandler(self._log_fh)
self._log_fh.close()
+ @staticmethod
def main():
warnings.simplefilter("default")
os.environ["PYTHONWARNINGS"] = "default"