Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit913fa1c

Browse files
authored
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 isdestroyed. The C implementation doesn't give access to theinternal BufferedWriter, so just ignore the warning instead.
1 parent0d19427 commit913fa1c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎Lib/test/test_io.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,6 +2070,11 @@ def writer_close():
20702070

20712071
# Silence destructor error
20722072
writer.close=lambda:None
2073+
writer=None
2074+
2075+
withsupport.catch_unraisable_exception():
2076+
pair=None
2077+
support.gc_collect()
20732078

20742079
deftest_reader_writer_close_error_on_close(self):
20752080
defreader_close():

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp