#NEWLINE# def assert_data( filename ) : #NEWLINE# #INDENT# if filename . endswith ( '.md' ) : #NEWLINE# #INDENT# filename = os . path . join ( root , 'fixtures' , 'data' , filename ) #NEWLINE# with open ( filename ) as f : #NEWLINE# #INDENT# text = f . read ( ) . strip ( ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# text = filename #NEWLINE# #UNINDENT# rv = MarkdownWithMath ( renderer = MathRenderer ( ) ) . render ( text ) #NEWLINE# assert ( text in f )