Unverified Kaydet (Commit) 913fa1c8 authored tarafından Victor Stinner's avatar Victor Stinner Kaydeden (comit) GitHub

bpo-37223, test_io: silence last 'Exception ignored in:' (GH-14029)

Use catch_unraisable_exception() to ignore 'Exception ignored in:'
error when the internal BufferedWriter of the BufferedRWPair is
destroyed. The C implementation doesn't give access to the
internal BufferedWriter, so just ignore the warning instead.
üst 0d194277
......@@ -2070,6 +2070,11 @@ class BufferedRWPairTest(unittest.TestCase):
# Silence destructor error
writer.close = lambda: None
writer = None
with support.catch_unraisable_exception():
pair = None
support.gc_collect()
def test_reader_writer_close_error_on_close(self):
def reader_close():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment