Skip to content

Commit 61e54e5

Browse files
authored
gh-136003: Close file descriptors in test (GH-139225)
This fixes file descriptor leaks introduced in GH-136004
1 parent a756a4b commit 61e54e5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Lib/test/test_capi/test_misc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1996,6 +1996,7 @@ def test_pending_call_creates_thread_subinterpreter(self):
19961996
def output():
19971997
time.sleep(1)
19981998
os.write({w}, b"x")
1999+
os.close({w})
19992000
20002001
20012002
def callback():
@@ -2014,6 +2015,7 @@ def create_pending_call():
20142015
interp.close()
20152016
data = os.read(r, 1)
20162017
self.assertEqual(data, b"x")
2018+
os.close(r)
20172019

20182020

20192021
@requires_subinterpreters

0 commit comments

Comments
 (0)