mirror of
https://github.com/python/cpython.git
synced 2026-05-08 11:31:13 +00:00
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
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| test_api.py | ||
| test_channels.py | ||
| test_lifecycle.py | ||
| test_queues.py | ||
| test_stress.py | ||
| utils.py | ||