def is_called_from_pytest():
 return getattr(matplotlib, u'_called_from_pytest', False)

def is_called_from_pytest ( ) : return getattr ( matplotlib , u'_called_from_pytest' , False )
returns whether the call was done from pytest .