#NEWLINE# def _test_get_packet_count( self , is_target ) : #NEWLINE# #INDENT# sw = ( self . target_sw if is_target else self . tester_sw ) #NEWLINE# xid = sw . send_port_stats ( ) #NEWLINE# self . send_msg_xids . append ( stats ) #NEWLINE# self . _wait ( ) #NEWLINE# result = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for msg in self . rcv_msgs : #NEWLINE# #INDENT# for stats in msg . body : #NEWLINE# #INDENT# result [ stats . port_no ] = { #NEWLINE# #INDENT# 'rx' : stats . rx_packets , #NEWLINE# 'tx' : stats . tx_packets , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# #UNINDENT# return result