#NEWLINE# def get_suite( ) : #NEWLINE# #INDENT# suite = unittest . TestSuite ( ) #NEWLINE# test_cases = ( DeviceTest , ConfigurationTest , InterfaceTest , EndpointTest ) #NEWLINE# for m in ( libusb1 , libusb0 , openusb ) : #NEWLINE# #INDENT# b = m . get_backend ( ) #NEWLINE# if ( b is None ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# dev = utils . find_my_device ( test_cases ) #NEWLINE# if ( dev is None ) : #NEWLINE# #INDENT# utils . logger . warning ( 'Test hardware not found for backend %s' , m . __name__ ) #NEWLINE# continue #NEWLINE# #UNINDENT# for ObjectTestCase in test_cases : #NEWLINE# #INDENT# utils . logger . info ( 'Adding %s(%s) to test suite...' , ObjectTestCase . __name__ , m . __name__ ) #NEWLINE# suite . addTest ( ObjectTestCase ( dev ) ) #NEWLINE# #UNINDENT# #UNINDENT# return suite