From da8c45629977460c11eca95ce881d5bcbfd4b403 Mon Sep 17 00:00:00 2001 From: Alexander Shadchin Date: Sun, 11 Aug 2024 17:42:55 +0300 Subject: [PATCH 1/2] Fix test_create_server_4 After https://github.com/python/cpython/issues/121913 error message `[errno 98] address already in use` --- tests/test_tcp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_tcp.py b/tests/test_tcp.py index 812e62b8..c00c8b98 100644 --- a/tests/test_tcp.py +++ b/tests/test_tcp.py @@ -248,8 +248,8 @@ def test_create_server_4(self): addr = sock.getsockname() with self.assertRaisesRegex(OSError, - r"error while attempting.*\('127.*: " - r"address( already)? in use"): + r"error while attempting.*\('127.*:" + r"( \[errno \d+\])? address( already)? in use"): self.loop.run_until_complete( self.loop.create_server(object, *addr)) From 05f8442b5557a3723536e08ad9f06626c128234d Mon Sep 17 00:00:00 2001 From: Alexander Shadchin Date: Sun, 11 Aug 2024 17:49:52 +0300 Subject: [PATCH 2/2] Fix flake8 --- tests/test_tcp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_tcp.py b/tests/test_tcp.py index c00c8b98..d7a73fbf 100644 --- a/tests/test_tcp.py +++ b/tests/test_tcp.py @@ -249,7 +249,8 @@ def test_create_server_4(self): with self.assertRaisesRegex(OSError, r"error while attempting.*\('127.*:" - r"( \[errno \d+\])? address( already)? in use"): + r"( \[errno \d+\])? address" + r"( already)? in use"): self.loop.run_until_complete( self.loop.create_server(object, *addr))