#NEWLINE# def test_register_multiple_clients( self ) : #NEWLINE# #INDENT# ' Adds multiple publishers then removes them.  ' #NEWLINE# topic = '/test_register_multiple_clients' #NEWLINE# msg_type = 'std_msgs/String' #NEWLINE# p = MultiPublisher ( topic , msg_type ) #NEWLINE# self . assertFalse ( p . has_clients ( ) ) #NEWLINE# for i in range ( 1000 ) : #NEWLINE# #INDENT# p . register_client ( ( 'client%d' % i ) ) #NEWLINE# self . assertTrue ( p . has_clients ( ) ) #NEWLINE# #UNINDENT# for i in range ( 1000 ) : #NEWLINE# #INDENT# self . assertTrue ( p . has_clients ( ) ) #NEWLINE# p . unregister_client ( ( 'client%d' % i ) ) #NEWLINE# #UNINDENT# self . assertFalse ( p . has_clients ( ) )