Skip to content

Commit

Permalink
Add test for three consectutive routes with overlap
Browse files Browse the repository at this point in the history
  • Loading branch information
arneboockmeyer committed Jun 27, 2024
1 parent 2288139 commit 140c3f6
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions test/interlocking_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,21 @@ def test_consecutive_routes():
route_3 = topologyhelper.get_route_by_signal_names(topology, "60AS1", "60BS3")
asyncio.run(interlockinghelper.set_route(interlocking, route_3, True, "RB101"))

asyncio.run(interlocking.reset())

# Increase speed to add overlap
for route in interlocking.routes:
route.yaramo_route.maximum_speed = 50

# Test three in a row consecutive routes, everything fine
route_1 = topologyhelper.get_route_by_signal_names(topology, "60BS1", "60ES1")
asyncio.run(interlockinghelper.set_route(interlocking, route_1, True, "RB101"))
route_2 = topologyhelper.get_route_by_signal_names(topology, "60ES1", "60AS2")
asyncio.run(interlockinghelper.set_route(interlocking, route_2, True, "RB101"))
route_3 = topologyhelper.get_route_by_signal_names(topology, "60AS2", "60BS3")
asyncio.run(interlockinghelper.set_route(interlocking, route_3, True, "RB101"))



class TestConsecutiveRouteDetectionWithTwoLastTracks(unittest.TestCase):

Expand Down

0 comments on commit 140c3f6

Please sign in to comment.