From: AN Long Date: Thu, 23 Mar 2023 16:34:48 +0000 (+0800) Subject: gh-102943: Stop checking localized error text in socket tests on Windows (GH-102944) X-Git-Tag: v3.12.0a7~81 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=bf42eb8722befddf099a7bc26ea4a258179c32bf;p=thirdparty%2FPython%2Fcpython.git gh-102943: Stop checking localized error text in socket tests on Windows (GH-102944) --- diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 60f106f2d1a1..32252f7b741f 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -2562,8 +2562,7 @@ class BasicHyperVTest(unittest.TestCase): socket.HV_GUID_LOOPBACK def testCreateHyperVSocketWithUnknownProtoFailure(self): - expected = "A protocol was specified in the socket function call " \ - "that does not support the semantics of the socket type requested" + expected = r"\[WinError 10041\]" with self.assertRaisesRegex(OSError, expected): socket.socket(socket.AF_HYPERV, socket.SOCK_STREAM)