mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
functional: always enable all python warnings
Of most importance is that this gives us a heads-up if anything we rely on has been deprecated. The default python behaviour only emits a warning if triggered from __main__ which is very limited. Setting the env variable further ensures that any python child processes will also display warnings. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Acked-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250715143023.1851000-11-berrange@redhat.com> Signed-off-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
committed by
Thomas Huth
parent
72bc0134b5
commit
c3fd296cf7
@@ -19,6 +19,7 @@ import shutil
|
|||||||
from subprocess import run
|
from subprocess import run
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
|
import warnings
|
||||||
import unittest
|
import unittest
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
@@ -235,6 +236,9 @@ class QemuBaseTest(unittest.TestCase):
|
|||||||
self._log_fh.close()
|
self._log_fh.close()
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
warnings.simplefilter("default")
|
||||||
|
os.environ["PYTHONWARNINGS"] = "default"
|
||||||
|
|
||||||
path = os.path.basename(sys.argv[0])[:-3]
|
path = os.path.basename(sys.argv[0])[:-3]
|
||||||
|
|
||||||
cache = os.environ.get("QEMU_TEST_PRECACHE", None)
|
cache = os.environ.get("QEMU_TEST_PRECACHE", None)
|
||||||
|
|||||||
Reference in New Issue
Block a user