#NEWLINE# def paired_tests( paired_test , options , test_labels ) : #NEWLINE# #INDENT# state = setup ( int ( options . verbosity ) , test_labels ) #NEWLINE# test_labels = ( test_labels or get_installed ( ) ) #NEWLINE# print ( '***** Trying paired execution' ) #NEWLINE# for label in [ paired_test , 'model_inheritance_same_model_name' ] : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# test_labels . remove ( label ) #NEWLINE# #UNINDENT# except ValueError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# subprocess_args = [ sys . executable , upath ( __file__ ) , ( '--settings=%s' % options . settings ) ] #NEWLINE# if options . failfast : #NEWLINE# #INDENT# subprocess_args . append ( '--failfast' ) #NEWLINE# #UNINDENT# if options . verbosity : #NEWLINE# #INDENT# subprocess_args . append ( ( '--verbosity=%s' % options . verbosity ) ) #NEWLINE# #UNINDENT# if ( not options . interactive ) : #NEWLINE# #INDENT# subprocess_args . append ( '--noinput' ) #NEWLINE# #UNINDENT# for ( i , label ) in enumerate ( test_labels ) : #NEWLINE# #INDENT# print ( ( '***** %d of %d: Check test pairing with %s' % ( ( i + 1 ) , len ( test_labels ) , label ) ) ) #NEWLINE# failures = subprocess . call ( ( subprocess_args + [ label , paired_test ] ) ) #NEWLINE# if failures : #NEWLINE# #INDENT# print ( ( '***** Found problem pair with %s' % label ) ) #NEWLINE# return #NEWLINE# #UNINDENT# #UNINDENT# print ( '***** No problem pair found' ) #NEWLINE# teardown ( state )