Commit 5a9e91b0 authored by Brett Cannon's avatar Brett Cannon

Silence ResourceWarning when testing that the file destructor closes the file.

parent e1eca4e3
......@@ -461,6 +461,7 @@ class IOTest(unittest.TestCase):
def flush(self):
record.append(3)
super().flush()
with support.check_warnings(('', ResourceWarning)):
f = MyFileIO(support.TESTFN, "wb")
f.write(b"xxx")
del f
......
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