#NEWLINE# def test_testMethodPrefix__loadTestsFromNames( self ) : #NEWLINE# #INDENT# m = types . ModuleType ( 'm' ) #NEWLINE# class Foo ( unittest . TestCase ) : #NEWLINE# #INDENT# def test_1( self ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# def test_2( self ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# def foo_bar( self ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# m . Foo = Foo #NEWLINE# tests_1 = unittest . TestSuite ( [ unittest . TestSuite ( [ Foo ( 'foo_bar' ) ] ) ] ) #NEWLINE# tests_2 = unittest . TestSuite ( [ Foo ( 'test_1' ) , Foo ( 'test_2' ) ] ) #NEWLINE# tests_2 = unittest . TestSuite ( [ tests_2 ] ) #NEWLINE# loader = unittest . TestLoader ( ) #NEWLINE# loader . testMethodPrefix = 'foo' #NEWLINE# self . assertEqual ( loader . loadTestsFromNames ( [ 'Foo' ] , m ) , tests_1 ) #NEWLINE# loader . testMethodPrefix = 'test' #NEWLINE# self . assertEqual ( loader . loadTestsFromNames ( [ 'Foo' ] , m ) , tests_2 )