Skip to content

Commit

Permalink
simplified test
Browse files Browse the repository at this point in the history
  • Loading branch information
rodja committed Jul 17, 2024
1 parent 0238113 commit 75a0c51
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions tests/test_navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,12 @@ async def test_straight_line_with_failing_gnss(system: System, gnss: GnssSimulat
async def empty():
return None
create_new_record = gnss._create_new_record
detector.simulated_objects.append(rosys.vision.SimulatedObject(category_name='thistle',
position=rosys.geometry.Point3d(x=0.1, y=0, z=0)))
detector.simulated_objects.append(rosys.vision.SimulatedObject(category_name='thistle',
position=rosys.geometry.Point3d(x=0.16, y=0, z=0)))
detector.simulated_objects.append(rosys.vision.SimulatedObject(category_name='thistle',
position=rosys.geometry.Point3d(x=0.26, y=0, z=0)))
detector.simulated_objects.append(rosys.vision.SimulatedObject(category_name='thistle',
position=rosys.geometry.Point3d(x=0.36, y=0, z=0)))
system.current_implement = system.implements['Weed Screw']
system.automator.start()
await forward(10)
await forward(5)
gnss._create_new_record = empty # type: ignore
await forward(0.5)
gnss._create_new_record = create_new_record
await forward(20)
await forward(5)
assert system.automator.is_running
assert len(detector.simulated_objects) == 0
assert system.odometer.prediction.yaw_deg == pytest.approx(0, abs=1)
Expand Down

0 comments on commit 75a0c51

Please sign in to comment.