Fix test_create_server_4 with Python 3.12.5 (#614)

After https://github.com/python/cpython/issues/121913 error message `[errno 98] address already in use`
This commit is contained in:
Alexander Shadchin 2024-08-13 17:18:25 +03:00 committed by GitHub
parent 6c770dc3fb
commit 62f92393b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -248,8 +248,9 @@ class _TestTCP:
addr = sock.getsockname() addr = sock.getsockname()
with self.assertRaisesRegex(OSError, with self.assertRaisesRegex(OSError,
r"error while attempting.*\('127.*: " r"error while attempting.*\('127.*:"
r"address( already)? in use"): r"( \[errno \d+\])? address"
r"( already)? in use"):
self.loop.run_until_complete( self.loop.run_until_complete(
self.loop.create_server(object, *addr)) self.loop.create_server(object, *addr))