mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
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.
This commit is contained in:
parent
25f6ff5d3e
commit
1b10efad66
1 changed files with 3 additions and 0 deletions
|
|
@ -2139,6 +2139,9 @@ class SubinterpreterTest(unittest.TestCase):
|
||||||
}
|
}
|
||||||
|
|
||||||
r, w = os.pipe()
|
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'''
|
script = textwrap.dedent(f'''
|
||||||
from test.test_capi.check_config import run_singlephase_check
|
from test.test_capi.check_config import run_singlephase_check
|
||||||
run_singlephase_check({override}, {w})
|
run_singlephase_check({override}, {w})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue