mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
iotests/check: 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>
This commit is contained in:
committed by
John Snow
parent
2b2fb25c2a
commit
9a494d8353
@@ -21,6 +21,7 @@ import sys
|
||||
import argparse
|
||||
import shutil
|
||||
from pathlib import Path
|
||||
import warnings
|
||||
|
||||
from findtests import TestFinder
|
||||
from testenv import TestEnv
|
||||
@@ -137,6 +138,9 @@ def make_argparser() -> argparse.ArgumentParser:
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
warnings.simplefilter("default")
|
||||
os.environ["PYTHONWARNINGS"] = "default"
|
||||
|
||||
args = make_argparser().parse_args()
|
||||
|
||||
env = TestEnv(source_dir=args.source_dir,
|
||||
|
||||
Reference in New Issue
Block a user