diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 46c7833b5c3..69487a1b50d 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -3732,6 +3732,7 @@ class CMiscIOTest(MiscIOTest): import sys import time import threading + from test.support import SuppressCrashReport file = sys.{stream_name} @@ -3740,6 +3741,10 @@ class CMiscIOTest(MiscIOTest): file.write('.') file.flush() + crash = SuppressCrashReport() + crash.__enter__() + # don't call __exit__(): the crash occurs at Python shutdown + thread = threading.Thread(target=run) thread.daemon = True thread.start()