gh-128770: raise warnings as errors in test suite - except for test_socket which still logs warnings, and internal test warnings that are now logged (#128973)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This commit is contained in:
Thomas Grainger 2025-03-27 19:06:52 +00:00 committed by GitHub
parent 972a295fe3
commit 8a00c9a4d2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 232 additions and 137 deletions

View file

@ -135,8 +135,10 @@ class PtyTest(unittest.TestCase):
new_dim = tty.tcgetwinsize(pty.STDIN_FILENO)
self.assertEqual(new_dim, target_dim,
"pty.STDIN_FILENO window size unchanged")
except OSError:
warnings.warn("Failed to set pty.STDIN_FILENO window size.")
except OSError as e:
logging.getLogger(__name__).warning(
"Failed to set pty.STDIN_FILENO window size.", exc_info=e,
)
pass
try: