diff options
| author | Daniel P. Berrangé <berrange@redhat.com> | 2025-07-15 15:30:19 +0100 |
|---|---|---|
| committer | Thomas Huth <thuth@redhat.com> | 2025-07-21 07:58:57 +0200 |
| commit | c3fd296cf7b1016671205e1525e4e9caf870f68e (patch) | |
| tree | a2c3f08cb746d47125dacc5b480a2d16abef0b09 /tests | |
| parent | 72bc0134b500d599f0f1c253c78c68df642d1634 (diff) | |
| download | focaccia-qemu-c3fd296cf7b1016671205e1525e4e9caf870f68e.tar.gz focaccia-qemu-c3fd296cf7b1016671205e1525e4e9caf870f68e.zip | |
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>
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/functional/qemu_test/testcase.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py index 71c7160adc..2a78e735f1 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -19,6 +19,7 @@ import shutil from subprocess import run import sys import tempfile +import warnings import unittest import uuid @@ -235,6 +236,9 @@ class QemuBaseTest(unittest.TestCase): self._log_fh.close() def main(): + warnings.simplefilter("default") + os.environ["PYTHONWARNINGS"] = "default" + path = os.path.basename(sys.argv[0])[:-3] cache = os.environ.get("QEMU_TEST_PRECACHE", None) |