#NEWLINE# def assertNumQueries( self , num , func = None ) : #NEWLINE# #INDENT# ' Check number of queries by flask_sqlalchemy. ' #NEWLINE# context = QueriesContext ( num , self ) #NEWLINE# if ( func is None ) : #NEWLINE# #INDENT# return context #NEWLINE# #UNINDENT# with context : #NEWLINE# #INDENT# func ( )