From: Petr Viktorin Date: Mon, 22 Sep 2025 11:22:27 +0000 (+0200) Subject: gh-136003: Close file descriptors in test (GH-139225) X-Git-Tag: v3.15.0a1~239 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=61e54e52ea48b6716d705294a18c6ac22d90741f;p=thirdparty%2FPython%2Fcpython.git gh-136003: Close file descriptors in test (GH-139225) This fixes file descriptor leaks introduced in GH-136004 --- diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py index fe1287167d3e..229a7c2afa8f 100644 --- a/Lib/test/test_capi/test_misc.py +++ b/Lib/test/test_capi/test_misc.py @@ -1996,6 +1996,7 @@ class SubinterpreterTest(unittest.TestCase): def output(): time.sleep(1) os.write({w}, b"x") + os.close({w}) def callback(): @@ -2014,6 +2015,7 @@ class SubinterpreterTest(unittest.TestCase): interp.close() data = os.read(r, 1) self.assertEqual(data, b"x") + os.close(r) @requires_subinterpreters