Skip to content

Commit

Permalink
Raise assert error with message
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmyzhai committed Nov 21, 2024
1 parent e7742e9 commit e5e9af3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test-cases/functional/ptf/p4_dash_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def verify_flow(eni_mac, vnet_id, packet, existed = True):
sport = packet['UDP'].sport
dport = packet['UDP'].dport
else: # TODO: later for other ip proto
assert(False)
assert False, "Not TCP/UDP packet"

flow_table = P4FlowTable()
flow = flow_table.get_flow_entry(eni_mac, vnet_id,
Expand All @@ -277,9 +277,9 @@ def verify_flow(eni_mac, vnet_id, packet, existed = True):
dport,
packet['IP'].proto)
if existed:
assert(flow)
assert flow, "flow not found"
else:
assert(not flow)
assert not flow, "flow still found"


def verify_no_flow(eni_mac, vnet_id, packet):
Expand Down

0 comments on commit e5e9af3

Please sign in to comment.