cpython/Lib/test/test_interpreters
Miss Islington (bot) 82ab8fb666
[3.14] tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345) (#148410)
tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345)

test_interpreters: use errno.EBADF instead of hardcoded number in _close_file()

Replace the hardcoded `9` check in `Lib/test/test_interpreters/utils.py` with `errno.EBADF`.

Using `errno.EBADF` makes the helper portable across platforms with different errno numbering while preserving the intended behavior.
(cherry picked from commit cef334fd4c)

Co-authored-by: Artem Yarulin <artem.yarulin@kapteko.com>
2026-04-12 18:13:14 -07:00
..
__init__.py gh-117953: Skip test_interpreters properly without GIL (#120689) 2024-06-18 15:22:24 +00:00
__main__.py Fix trivial typo in test_interpreters (GH-113381) 2023-12-23 14:10:41 +00:00
test_api.py [3.14] GH-141509: Fix warning about remaining subinterpreters (GH-141528) (GH-141566) 2025-11-15 13:56:52 -05:00
test_channels.py [3.14] gh-140652: Fix a crash in _interpchannels.list_all() after closing a channel (GH-143743) (GH-144954) 2026-02-18 13:29:34 +00:00
test_lifecycle.py [3.14] gh-128639: Don't assume one thread in subinterpreter finalization with fixed daemon thread support (GH-134606) (GH-139050) 2025-10-07 13:30:38 -04:00
test_queues.py [3.14] gh-138253: Fix compatibility of sub-interpreters queues with queue.Queue (GH-138256) (#138367) 2025-09-08 18:37:39 +03:00
test_stress.py [3.14] gh-112729: Correctly fail when the process is out of memory during interpreter creation (GH-139164) (GH-139168) 2025-10-07 13:30:23 -04:00
utils.py [3.14] tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345) (#148410) 2026-04-12 18:13:14 -07:00