Fix test on MacOS
This commit is contained in:
parent
d3b632e123
commit
363dd79833
@ -123,7 +123,8 @@ class TestBaseServerRequests(BaseTest):
|
|||||||
with pytest.raises(OSError) as exc_info:
|
with pytest.raises(OSError) as exc_info:
|
||||||
sock.bind((address, 0))
|
sock.bind((address, 0))
|
||||||
assert (isinstance(exc_info.value, socket.gaierror) and
|
assert (isinstance(exc_info.value, socket.gaierror) and
|
||||||
exc_info.value.errno == server.COMPAT_EAI_ADDRFAMILY or
|
exc_info.value.errno in (socket.EAI_NONAME,
|
||||||
|
server.COMPAT_EAI_ADDRFAMILY) or
|
||||||
# Workaround for PyPy
|
# Workaround for PyPy
|
||||||
str(exc_info.value) == "address family mismatched")
|
str(exc_info.value) == "address family mismatched")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user