summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r--Lib/test/test_io.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 46c7833..69487a1 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()