Skip to content

Commit

Permalink
this is tricky to debug
Browse files Browse the repository at this point in the history
  • Loading branch information
robamu committed Nov 1, 2023
1 parent a7d1310 commit 9f1f0b4
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/cfdp/test_src_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,15 @@ def _state_checker(
self.assertEqual(fsm_res.states.state, expected_state)
self.assertEqual(fsm_res.states.step, expected_step)
if num_packets_ready > 0:
self.assertEqual(fsm_res.states.num_packets_ready, num_packets_ready)
if fsm_res.states.num_packets_ready != num_packets_ready:
self.assertEqual(
fsm_res.states.num_packets_ready, num_packets_ready
)
elif num_packets_ready == 0 and fsm_res.states.num_packets_ready > 0:
packets = []
while True:
packets.append(self.source_handler.get_next_packet().pdu)
raise AssertionError(f"Expected no packets, found: {packets}")
if num_packets_ready > 0:
self.assertTrue(self.source_handler.packets_ready)
if expected_state != CfdpState.IDLE:
Expand Down

0 comments on commit 9f1f0b4

Please sign in to comment.