diff --git a/tests/test_core.py b/tests/test_core.py index 5793728..3f49b32 100644 --- a/tests/test_core.py +++ b/tests/test_core.py @@ -19,7 +19,7 @@ def cleanup_files(files): async def test_connect_refused(unused_tcp_port): peer = Peer() await peer.start(('localhost', 0)) - with pytest.raises(ConnectionRefusedError): + with pytest.raises((ConnectionRefusedError, OSError)): await peer.connect(('localhost', unused_tcp_port))