Skip to content

Commit 08e52ea

Browse files
committed
network interface test fixed
1 parent ffeb735 commit 08e52ea

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

easy_audio_interfaces/tests/test_network_interfaces.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,11 @@ async def test_socket_heartbeat():
161161
@pytest.mark.asyncio
162162
async def test_socket_error_handling():
163163
"""Test error handling in SocketServer and SocketClient"""
164-
invalid_port = 123456 # Invalid port number
165164
test_port = BASE_TEST_PORT + 5
166165

167-
# Test invalid receiver port
166+
# Test invalid receiver port - use a negative port which should always fail
168167
with pytest.raises(OSError):
169-
async with SocketServer(port=invalid_port) as receiver:
168+
async with SocketServer(port=-1) as receiver:
170169
pass
171170

172171
# Test connection to non-existent receiver

0 commit comments

Comments
 (0)