Exemple #1
0
 def __init__(self, *args, **kwargs):
     print "START HERE"
     self.r = TreeReporter(*args, **kwargs)
     self.shouldStop = self.r.shouldStop
     self.separator = self.r.separator
     self.testsRun = self.r.testsRun
     self._starting2 = False
Exemple #2
0
 def factory(*args, **kwargs):
     """Custom factory tha apply the decorators to the TreeReporter"""
     if options.subunit:
         return SubunitReporter(*args, **kwargs)
     else:
         result = TreeReporter(*args, **kwargs)
         for decorator in reporter_decorators:
             result = decorator(result)
         return result
Exemple #3
0
def report_test_tree(output, flaky_tests):
    """
    Print all flaky tests as a tree.
    """
    reporter = TreeReporter(output)
    for (test, flaky) in flaky_tests:
        new_test = clone_test_with_new_id(
            test, '{}({})'.format(test.id(), ', '.join(flaky.jira_keys)))
        reporter.startTest(new_test)
        reporter.addSuccess(new_test)
        reporter.stopTest(new_test)
    reporter.done()
Exemple #4
0
 def setUp(self) -> None:
     self.stream = StringIO()
     self.distReporter = DistReporter(TreeReporter(self.stream))
     self.test = TestCase()