#NEWLINE# def runTests( self ) : #NEWLINE# #INDENT# if self . refleak : #NEWLINE# #INDENT# self . testRunner = RefleakTestRunner #NEWLINE# if ( not hasattr ( sys , 'gettotalrefcount' ) ) : #NEWLINE# #INDENT# warnings . warn ( 'detecting reference leaks requires a debug build of Python, only memory leaks will be detected' ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if self . list : #NEWLINE# #INDENT# self . testRunner = TestLister ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . testRunner is None ) : #NEWLINE# #INDENT# self . testRunner = unittest . TextTestRunner #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if ( self . multiprocess and ( not self . nomultiproc ) ) : #NEWLINE# #INDENT# self . testRunner = ParallelTestRunner ( self . testRunner , verbosity = self . verbosity , failfast = self . failfast , buffer = self . buffer ) #NEWLINE# #UNINDENT# def run_tests_real( ) : #NEWLINE# #INDENT# super ( NumbaTestProgram , self ) . runTests ( ) #NEWLINE# #UNINDENT# if self . profile : #NEWLINE# #INDENT# filename = ( os . path . splitext ( os . path . basename ( sys . modules [ '__main__' ] . __file__ ) ) [ 0 ] + '.prof' ) #NEWLINE# p = cProfile . Profile ( timer = time . perf_counter ) #NEWLINE# p . enable ( ) #NEWLINE# try : #NEWLINE# #INDENT# p . runcall ( run_tests_real ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# p . disable ( ) #NEWLINE# print ( ( 'Writing test profile data into %r' % ( filename , ) ) ) #NEWLINE# p . dump_stats ( filename ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# run_tests_real ( )