(self, assertion, msg=None, obj=None)
return assertion
assertion: what we're asserting
        msg: a static message describing the error
        obj: the specific piece of data, if any, that tripped the assertion

        returns the assertion itself
assertion: what we're asserting
        msg: a static message describing the error
        obj: the specific piece of data, if any, that tripped the assertion
assertion : what we re asserting msg : a static message describing the error obj : the specific piece of data if any that tripped the assertion
def _call(self, assertion, msg=None, obj=None):
        """
        assertion: what we're asserting
        msg: a static message describing the error
        obj: the specific piece of data, if any, that tripped the assertion

        returns the assertion itself
        """
        if not assertion:
            if self.debug or is_hard_mode():
                raise AssertionError(msg, obj)
            short_tb = get_traceback(skip=self.tb_skip, limit=self.key_limit)
            full_tb = get_traceback(skip=self.tb_skip)
            line = short_tb.strip().split('\n')[-1].strip()
            tb_id = hashlib.md5(short_tb.encode('utf-8')).hexdigest()
            count = ExponentialBackoff.increment(tb_id)
            if not self.use_exponential_backoff or not ExponentialBackoff.should_backoff(tb_id):
                if msg:
                    msg = msg.replace('\n', '\\n')
                self.send(SoftAssertInfo(traceback=full_tb,
                                         short_traceback=short_tb,
                                         count=count,
                                         msg=msg,
                                         key=tb_id, line=line, obj=obj))
        return assertion
def _call ( self , assertion , msg = None , obj = None ) : if not assertion : if self . debug or is_hard_mode ( ) : raise AssertionError ( msg , obj ) short_tb = get_traceback ( skip = self . tb_skip , limit = self . key_limit ) full_tb = get_traceback ( skip = self . tb_skip ) line = short_tb . strip ( ) . split ( '\n' ) [ - 1 ] . strip ( ) tb_id = hashlib . md5 ( short_tb . encode ( 'utf-8' ) ) . hexdigest ( ) count = ExponentialBackoff . increment ( tb_id ) if not self . use_exponential_backoff or not ExponentialBackoff . should_backoff ( tb_id ) : if msg : msg = msg . replace ( '\n' , '\\n' ) self . send ( SoftAssertInfo ( traceback = full_tb , short_traceback = short_tb , count = count , msg = msg , key = tb_id , line = line , obj = obj ) ) return assertion