Can raise OSError for connection failure.
This commit is contained in:
parent
afcb89cdf2
commit
895121f097
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ def cleanup_files(files):
|
||||||
async def test_connect_refused(unused_tcp_port):
|
async def test_connect_refused(unused_tcp_port):
|
||||||
peer = Peer()
|
peer = Peer()
|
||||||
await peer.start(('localhost', 0))
|
await peer.start(('localhost', 0))
|
||||||
with pytest.raises(ConnectionRefusedError):
|
with pytest.raises((ConnectionRefusedError, OSError)):
|
||||||
await peer.connect(('localhost', unused_tcp_port))
|
await peer.connect(('localhost', unused_tcp_port))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue