Skip to content

Commit

Permalink
gh-117649: Fix file descriptor leak in (expected) failing test case (#…
Browse files Browse the repository at this point in the history
…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.
  • Loading branch information
colesbury authored Apr 11, 2024
1 parent 25f6ff5 commit 1b10efa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Lib/test/test_capi/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -2139,6 +2139,9 @@ def check(enabled, override):
}

r, w = os.pipe()
if Py_GIL_DISABLED:
# gh-117649: The test fails before `w` is closed
self.addCleanup(os.close, w)
script = textwrap.dedent(f'''
from test.test_capi.check_config import run_singlephase_check
run_singlephase_check({override}, {w})
Expand Down

0 comments on commit 1b10efa

Please sign in to comment.