From 12ee7448f85db38bbf0a9eb3fce873774bd9426d Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 8 Oct 2015 08:56:06 -0700 Subject: Issue #23919: Prevents assert dialogs appearing in the test suite. --- Lib/test/regrtest.py | 13 +++++++++++-- Misc/NEWS | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index a04c3f7..c246fe0 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -511,7 +511,13 @@ def main(tests=None, **kwargs): import gc gc.set_threshold(ns.threshold) if ns.nowindows: + print('The --nowindows (-n) option is deprecated. ' + 'Use -vv to display assertions in stderr.') + try: import msvcrt + except ImportError: + pass + else: msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS| msvcrt.SEM_NOALIGNMENTFAULTEXCEPT| msvcrt.SEM_NOGPFAULTERRORBOX| @@ -523,8 +529,11 @@ def main(tests=None, **kwargs): pass else: for m in [msvcrt.CRT_WARN, msvcrt.CRT_ERROR, msvcrt.CRT_ASSERT]: - msvcrt.CrtSetReportMode(m, msvcrt.CRTDBG_MODE_FILE) - msvcrt.CrtSetReportFile(m, msvcrt.CRTDBG_FILE_STDERR) + if ns.verbose and ns.verbose >= 2: + msvcrt.CrtSetReportMode(m, msvcrt.CRTDBG_MODE_FILE) + msvcrt.CrtSetReportFile(m, msvcrt.CRTDBG_FILE_STDERR) + else: + msvcrt.CrtSetReportMode(m, 0) if ns.wait: input("Press any key to continue...") diff --git a/Misc/NEWS b/Misc/NEWS index e055bd5..cfa1541 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -278,6 +278,8 @@ Documentation Tests ----- +- Issue #23919: Prevents assert dialogs appearing in the test suite. + - PCbuild\rt.bat now accepts an unlimited number of arguments to pass along to regrtest.py. Previously there was a limit of 9. -- cgit v0.12 From 3cc6da2b07a8aa78ec53a3ff5ea8d620f4753db6 Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Thu, 8 Oct 2015 09:06:17 -0700 Subject: Removes deprecated -n option from buildbot script. --- Tools/buildbot/test.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tools/buildbot/test.bat b/Tools/buildbot/test.bat index d1f5f52..ff7d167 100644 --- a/Tools/buildbot/test.bat +++ b/Tools/buildbot/test.bat @@ -16,4 +16,4 @@ if "%1"=="+q" (set rt_opts=%rt_opts:-q=%) & shift & goto CheckOpts if NOT "%1"=="" (set regrtest_args=%regrtest_args% %1) & shift & goto CheckOpts echo on -call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW -n --timeout=3600 %regrtest_args% +call "%here%..\..\PCbuild\rt.bat" %rt_opts% -uall -rwW --timeout=3600 %regrtest_args% -- cgit v0.12