changeset: 98597:69c4fa62b608 branch: 3.5 parent: 98593:1d14675c6050 user: Steve Dower date: Thu Oct 08 08:56:06 2015 -0700 files: Lib/test/regrtest.py Misc/NEWS description: Issue #23919: Prevents assert dialogs appearing in the test suite. diff -r 1d14675c6050 -r 69c4fa62b608 Lib/test/regrtest.py --- a/Lib/test/regrtest.py Thu Oct 08 06:34:31 2015 +0300 +++ b/Lib/test/regrtest.py Thu Oct 08 08:56:06 2015 -0700 @@ -511,7 +511,13 @@ 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 @@ 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 -r 1d14675c6050 -r 69c4fa62b608 Misc/NEWS --- a/Misc/NEWS Thu Oct 08 06:34:31 2015 +0300 +++ b/Misc/NEWS Thu Oct 08 08:56:06 2015 -0700 @@ -278,6 +278,8 @@ 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.