]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
tests: use errno.EBADF instead of hardcoded number in _close_file() (GH-148345)
authorArtem Yarulin <artem.yarulin@kapteko.com>
Sun, 12 Apr 2026 00:01:18 +0000 (03:01 +0300)
committerGitHub <noreply@github.com>
Sun, 12 Apr 2026 00:01:18 +0000 (17:01 -0700)
commitcef334fd4c4c24a542ce81ad940b1426b5a7cdbd
treecc89ea47225ff4694a575351da49ecda7670194f
parent8a466fa3d90a9e1f04d23c05ee2cf3f3c406ba30
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.
Lib/test/test_interpreters/utils.py