Skip to content

Commit

Permalink
update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
InvincibleRMC committed Jun 1, 2024
1 parent 5b0615d commit 7eab9aa
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/surface/transceiver/test/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_message_parser(packet_handler: SerialReaderPacketHandler) -> None:
profile_number=1,
profile_half=1,
time_data=[5.231683254241943, 5.247383117675781, 5.263083457946777, 5.278783321380615, 5.294483184814453, 5.310183525085449, 5.325883388519287, 5.341583251953125, 5.357283115386963, 5.372983455657959, 5.388683319091797, 5.404383182525635, 5.420100212097168, 5.435766696929932, 5.4514665603637695, 5.467166900634766, 5.4828667640686035, 5.498566627502441, 5.514266490936279, 5.529966831207275, 5.545666694641113, 5.561366558074951, 5.577066898345947, 5.592766761779785, 5.608466625213623, 5.624216556549072, 5.639916896820068, 5.655616760253906, 5.671316623687744, 5.687016487121582, 5.702716827392578], # noqa 501
depth_data=[10.082781791687012, 10.083189964294434, 10.08747386932373, 10.113687515258789, 10.161116600036621, 10.223844528198242, 10.305442810058594, 10.415090560913086, 10.550849914550781, 10.71210765838623, 10.728734016418457, 10.742401123046875, 10.74362564086914, 10.7450532913208, 10.745665550231934, 10.74627685546875, 10.746582984924316, 10.746889114379883, 10.746582984924316, 10.746480941772461, 10.746991157531738, 10.74627685546875, 10.745767593383789, 10.745665550231934, 10.744338989257812, 10.744543075561523, 10.7450532913208, 10.744134902954102, 10.744645118713379, 10.745359420776367, 10.745869636535645] # noqa 501
depth_data=[-0.2521384060382843, -0.25173041224479675, -0.24744650721549988, -0.2212330847978592, -0.1738041341304779, -0.11107552796602249, -0.029477344825863838, 0.08017022162675858, 0.21592919528484344, 0.3771876096725464, 0.39381325244903564, 0.40748095512390137, 0.4087049067020416, 0.41013288497924805, 0.41074487566947937, 0.4113568663597107, 0.41166284680366516, 0.411968857049942, 0.41166284680366516, 0.41156086325645447, 0.4120708405971527, 0.4113568663597107, 0.41084685921669006, 0.41074487566947937, 0.40941891074180603, 0.4096229076385498, 0.41013288497924805, 0.40921491384506226, 0.4097248911857605, 0.4104388654232025, 0.41094887256622314]] # noqa 501
)

with pytest.raises(ValueError, match="Packet expected 3 sections, found 2 sections"):
Expand Down Expand Up @@ -83,7 +83,6 @@ def test_handle_ros_single(packet_handler: SerialReaderPacketHandler) -> None:


def equal(q1: Queue[T], q2: Queue[T]) -> bool:

if isinstance(q1.queue, deque) and isinstance(q2.queue, deque):
return q1.queue == q2.queue
return False

0 comments on commit 7eab9aa

Please sign in to comment.