cpython/Lib/test/test_interpreters
Miss Islington (bot) 74be9e2c76
[3.13] tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345) (#148411)
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:53 -07:00
..
__init__.py [3.13] gh-117953: Skip test_interpreters properly without GIL (gh-120707) 2024-06-18 16:05:30 +00:00
__main__.py Fix trivial typo in test_interpreters (GH-113381) 2023-12-23 14:10:41 +00:00
test_api.py [3.13] gh-143377: fix crashes in _interpreters.capture_exception (GH-143418) (#143653) 2026-01-10 13:59:14 +00:00
test_channels.py [3.13] gh-140652: Fix a crash in _interpchannels.list_all() after clo…sing a channel (GH-143743) (GH-144953) 2026-02-18 14:18:39 +00:00
test_lifecycle.py gh-76785: Rename _xxsubinterpreters to _interpreters (gh-117791) 2024-04-24 16:18:24 +00:00
test_queues.py [3.13] gh-135698: Fix Cross-interpreter Queue.full() With Negative/Default max_size (gh-135778) 2025-06-23 19:38:41 +00:00
test_stress.py [3.13] gh-112729: Correctly fail when the process is out of memory during interpreter creation (GH-139164) (GH-139169) 2025-09-19 15:09:44 +00:00
utils.py [3.13] tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345) (#148411) 2026-04-12 18:13:53 -07:00