File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -511,7 +511,13 @@ def main(tests=None, **kwargs):
511511 import gc
512512 gc .set_threshold (ns .threshold )
513513 if ns .nowindows :
514+ print ('The --nowindows (-n) option is deprecated. '
515+ 'Use -vv to display assertions in stderr.' )
516+ try :
514517 import msvcrt
518+ except ImportError :
519+ pass
520+ else :
515521 msvcrt .SetErrorMode (msvcrt .SEM_FAILCRITICALERRORS |
516522 msvcrt .SEM_NOALIGNMENTFAULTEXCEPT |
517523 msvcrt .SEM_NOGPFAULTERRORBOX |
@@ -523,8 +529,11 @@ def main(tests=None, **kwargs):
523529 pass
524530 else :
525531 for m in [msvcrt .CRT_WARN , msvcrt .CRT_ERROR , msvcrt .CRT_ASSERT ]:
526- msvcrt .CrtSetReportMode (m , msvcrt .CRTDBG_MODE_FILE )
527- msvcrt .CrtSetReportFile (m , msvcrt .CRTDBG_FILE_STDERR )
532+ if ns .verbose and ns .verbose >= 2 :
533+ msvcrt .CrtSetReportMode (m , msvcrt .CRTDBG_MODE_FILE )
534+ msvcrt .CrtSetReportFile (m , msvcrt .CRTDBG_FILE_STDERR )
535+ else :
536+ msvcrt .CrtSetReportMode (m , 0 )
528537 if ns .wait :
529538 input ("Press any key to continue..." )
530539
Original file line number Diff line number Diff line change @@ -278,6 +278,8 @@ Documentation
278278Tests
279279-----
280280
281+ - Issue #23919: Prevents assert dialogs appearing in the test suite.
282+
281283- PCbuild\rt.bat now accepts an unlimited number of arguments to pass along
282284 to regrtest.py. Previously there was a limit of 9.
283285
You can’t perform that action at this time.
0 commit comments