Skip to content

Commit a2e82d5

Browse files
test_simulator: use unused_tcp_port fixture (#2141)
1 parent 6b728ec commit a2e82d5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/sub_server/test_simulator.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Test datastore."""
2+
23
import asyncio
34
import copy
45
import json
@@ -582,9 +583,9 @@ def test_simulator_action_random(self, celltype, minval, maxval):
582583
)
583584
),
584585
)
585-
async def test_simulator_server_tcp(self):
586+
async def test_simulator_server_tcp(self, unused_tcp_port):
586587
"""Test init simulator server."""
587-
task = ModbusSimulatorServer()
588+
task = ModbusSimulatorServer(http_port=unused_tcp_port)
588589
await task.run_forever(only_start=True)
589590
await asyncio.sleep(0.5)
590591
await task.stop()

0 commit comments

Comments
 (0)