# HG changeset patch # User Oleg Oshmyan # Date 1294329119 -7200 # Node ID 7520b6bb6636af1d5e3fa108968e37c4e5ca4e29 # Parent 1bee3a0beeb588d6fef30b9f22dd26e704f24ea9 Windows Error Reporting is now suppressed (at least the dialogs) diff -r 1bee3a0beeb5 -r 7520b6bb6636 testcases.py --- a/testcases.py Mon Jan 03 01:48:02 2011 +0200 +++ b/testcases.py Thu Jan 06 17:51:59 2011 +0200 @@ -38,6 +38,19 @@ TerminateProcess = None +# Do not show error messages due to errors in the program being tested +try: + import ctypes + try: + errmode = ctypes.windll.kernel32.GetErrorMode() + except AttributeError: + errmode = ctypes.windll.kernel32.SetErrorMode(0) + errmode |= 0x8003 + ctypes.windll.kernel32.SetErrorMode(errmode) +except Exception: + pass + + # Do the hacky-wacky dark magic needed to catch presses of the Escape button. # If only Python supported forcible termination of threads... if not sys.stdin.isatty():