From b880c1558e8562351e75837e1ba2932ae5d17111 Mon Sep 17 00:00:00 2001 From: Brett Cannon Date: Tue, 15 Mar 2011 16:03:09 -0400 Subject: Add warnings support to test.support.args_from_interpreter_flags(). This allows the -j flag to regrtest to propagate warnings settings properly. --- Lib/test/support.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/support.py b/Lib/test/support.py index 53c2956..f5a53ca 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -1374,7 +1374,7 @@ def strip_python_stderr(stderr): def args_from_interpreter_flags(): """Return a list of command-line arguments reproducing the current - settings in sys.flags.""" + settings in sys.flags and sys.warnoptions.""" flag_opt_map = { 'bytes_warning': 'b', 'dont_write_bytecode': 'B', @@ -1389,6 +1389,9 @@ def args_from_interpreter_flags(): v = getattr(sys.flags, flag) if v > 0: args.append('-' + opt * v) + if sys.warnoptions: + args.append('-W') + args.extend(sys.warnoptions) return args #============================================================ -- cgit v0.12