def run(self, test, result): with warnings.catch_warnings(record=True) as ww: warnings.resetwarnings() warnings.simplefilter('default') self._run(test, result) if ww: for wmsg in ww: if wmsg.source is not None: wmsg.source = str(wmsg.source) result.addWarning(test, wmsg)
def run(self, test, result): with warnings.catch_warnings(record=True) as ww: warnings.resetwarnings() warnings.simplefilter('default') # This is temporary, until we implement `subtransaction` # functionality of RFC1004 warnings.filterwarnings( 'ignore', message=r'The "transaction\(\)" method is deprecated' r' and is scheduled to be removed', category=DeprecationWarning) self._run(test, result) if ww: for wmsg in ww: if wmsg.source is not None: wmsg.source = str(wmsg.source) result.addWarning(test, wmsg)