Ejemplo n.º 1
0
 def __str__(self):
     dict = self.args[0]
     dict2 = {}
     for obj, traceback in dict.items():
         traceback = traceback.splitlines()
         if len(traceback) > 8:
             traceback = ['    ...'] + traceback[-6:]
         traceback = '\n'.join(traceback)
         dict2.setdefault(traceback, [])
         dict2[traceback].append(obj)
     lines = ['{']
     for traceback, objs in dict2.items():
         lines.append('')
         for obj in objs:
             lines.append('%s:' % (obj, ))
         lines.append(traceback)
     lines.append('}')
     return '\n'.join(lines)
Ejemplo n.º 2
0
 def __str__(self):
     dict = self.args[0]
     dict2 = {}
     for obj, traceback in dict.items():
         traceback = traceback.splitlines()
         if len(traceback) > 8:
             traceback = ['    ...'] + traceback[-6:]
         traceback = '\n'.join(traceback)
         dict2.setdefault(traceback, [])
         dict2[traceback].append(obj)
     lines = ['{']
     for traceback, objs in dict2.items():
         lines.append('')
         for obj in objs:
             lines.append('%s:' % (obj,))
         lines.append(traceback)
     lines.append('}')
     return '\n'.join(lines)
Ejemplo n.º 3
0
 def pytest_steps_report_traceback(self, traceback):
     for line in traceback.splitlines():
         self.tw.line('{}{}'.format('  ' * self.outdent, line))