Make `test_terminal_eof` less flaky and faster (#39281)

Release Notes:

- N/A
77cc55656eKirill Bulatov committed on 10/1/2025, 12:14:06 PM· committed by GitHubparent1c85995
2 files changedLine totals unavailable