http://bugs.python.org/issue6381
merging revision 73819 from trunk
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index cac90f4..8986741 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -182,6 +182,8 @@
                 "under Windows, test would generate a spurious crash dialog")
         code = textwrap.dedent("""
             import sys
+            import msvcrt
+            msvcrt.SetErrorMode(msvcrt.SEM_FAILCRITICALERRORS)
 
             def f():
                 try: