Files
cpython/Lib
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
..
2026-04-07 16:13:20 +03:00