gh-102943: Stop checking localized error text in socket tests on Windows (GH-102944)

This commit is contained in:
AN Long 2023-03-24 00:34:48 +08:00 committed by GitHub
parent adb0621652
commit bf42eb8722
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2562,8 +2562,7 @@ def testHyperVConstants(self):
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)