#NEWLINE# def expected_traceback( lineno1 , lineno2 , header , min_count = 1 ) : #NEWLINE# #INDENT# regex = header #NEWLINE# regex += ( '  File "<string>", line %s in func\n' % header ) #NEWLINE# regex += ( '  File "<string>", line %s in <module>' % lineno2 ) #NEWLINE# if ( 1 < min_count ) : #NEWLINE# #INDENT# return ( ( '^' + ( ( regex + '\n' ) * ( min_count - 1 ) ) ) + regex ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return ( ( '^' + regex ) + '$' )