Skip to content

Commit 1b10efa

Browse files
authored
gh-117649: Fix file descriptor leak in (expected) failing test case (#117780)
The test case is currently expected to fail in the free-threaded build. However, it fails before it gets a chance to close the write end of the pipe.
1 parent 25f6ff5 commit 1b10efa

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Lib/test/test_capi/test_misc.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,6 +2139,9 @@ def check(enabled, override):
21392139
}
21402140

21412141
r, w = os.pipe()
2142+
if Py_GIL_DISABLED:
2143+
# gh-117649: The test fails before `w` is closed
2144+
self.addCleanup(os.close, w)
21422145
script = textwrap.dedent(f'''
21432146
from test.test_capi.check_config import run_singlephase_check
21442147
run_singlephase_check({override}, {w})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy