diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 74d3794289bf69f..897c210f4767e1d 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1940,7 +1940,8 @@ def __enter__(self): self.old_value = msvcrt.GetErrorMode() - msvcrt.SetErrorMode(self.old_value | msvcrt.SEM_NOGPFAULTERRORBOX) + msvcrt.SetErrorMode(self.old_value | msvcrt.SEM_NOGPFAULTERRORBOX + | msvcrt.SEM_FAILCRITICALERRORS) # bpo-23314: Suppress assert dialogs in debug builds. # CrtSetReportMode() is only available in debug build.