Skip to content

Commit d6979b4

Browse files
committed
fix: narrow clean-record packet types in obstacle tests
1 parent 60248c4 commit d6979b4

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

tests/map/test_b01_q10_map_parser.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -498,6 +498,7 @@ def test_parse_obstacles_and_skip_cleaning_points_before_historical_trace() -> N
498498

499499
assert packet.obstacles == [Q10Obstacle(250, -300), Q10Obstacle(-32768, 32767)]
500500
assert packet.skip_cleaning_points == [Q10Point(-40, 50)]
501+
assert isinstance(packet, Q10CleanRecordMapPacket)
501502
assert packet.historical_trace is not None
502503
assert packet.historical_trace.points == [Q10Point(11, -12), Q10Point(13, -14)]
503504

@@ -524,6 +525,7 @@ def test_empty_obstacle_sections_do_not_consume_historical_header() -> None:
524525

525526
assert packet.obstacles == []
526527
assert packet.skip_cleaning_points == []
528+
assert isinstance(packet, Q10CleanRecordMapPacket)
527529
assert packet.historical_trace is not None
528530
assert packet.historical_trace.points == [Q10Point(10, -20)]
529531

@@ -544,6 +546,7 @@ def test_truncated_obstacle_sections_are_ignored(section: bytes) -> None:
544546

545547
assert packet.obstacles == []
546548
assert packet.skip_cleaning_points == []
549+
assert isinstance(packet, Q10CleanRecordMapPacket)
547550
assert packet.historical_trace is None
548551

549552

tests/map/test_b01_q10_render.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
Q10HeaderCalibration,
2323
Q10HistoricalTracePacket,
2424
Q10MapPacket,
25-
Q10Obstacle,
2625
Q10MapPacketKind,
26+
Q10Obstacle,
2727
Q10Point,
2828
Q10TracePacket,
2929
parse_map_packet,

0 commit comments

Comments
 (0)