diff options
author | Sam Gross <colesbury@gmail.com> | 2024-04-11 21:35:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-11 21:35:46 (GMT) |
commit | 1b10efad66e9a0b72aae82de23074eafa49ec4db (patch) | |
tree | 7d0facdaf2078acdfd84671f6c5731bb1aab881a | |
parent | 25f6ff5d3e92305659db62e7f7545f823f0dbd05 (diff) | |
download | cpython-1b10efad66e9a0b72aae82de23074eafa49ec4db.zip cpython-1b10efad66e9a0b72aae82de23074eafa49ec4db.tar.gz cpython-1b10efad66e9a0b72aae82de23074eafa49ec4db.tar.bz2 |
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.
-rw-r--r-- | Lib/test/test_capi/test_misc.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_capi/test_misc.py b/Lib/test/test_capi/test_misc.py index 8cdecaf..9c24ec8 100644 --- a/Lib/test/test_capi/test_misc.py +++ b/Lib/test/test_capi/test_misc.py @@ -2139,6 +2139,9 @@ class SubinterpreterTest(unittest.TestCase): } 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}) |