Lines Matching refs:tb
175 exctype, value, tb = err
176 tb = self._clean_tracebacks(exctype, value, tb, test)
178 exctype, value, tb,
195 def _clean_tracebacks(self, exctype, value, tb, test):
198 excs = [(exctype, value, tb)]
201 (exctype, value, tb) = excs.pop()
203 while tb and self._is_relevant_tb_level(tb):
204 tb = tb.tb_next
208 self._remove_unittest_tb_frames(tb)
211 ret = tb
214 value.__traceback__ = tb
223 def _is_relevant_tb_level(self, tb):
224 return '__unittest' in tb.tb_frame.f_globals
226 def _remove_unittest_tb_frames(self, tb):
227 '''Truncates usercode tb at the first unittest frame.
235 while tb and not self._is_relevant_tb_level(tb):
236 prev = tb
237 tb = tb.tb_next