mirror of
https://github.com/qemu/qemu.git
synced 2026-05-20 15:26:07 +00:00
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>
This commit is contained in:
committed by
Thomas Huth
parent
45d34fa8a4
commit
0ac3c31413
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user