Comment 4 for bug 625594

Revision history for this message
Martin Packman (gz) wrote :

The most immediate cause of this issue is code in testtools.testresult.real.ThreadsafeForwardingResult like:

    def addError(self, test, err=None, details=None):
        self.semaphore.acquire()
        try:
            self.result.startTest(test)
            self.result.addError(test, err, details=details)
            self.result.stopTest(test)
        finally:
            self.semaphore.release()

It's written like that to prevent different test results being interleaved in the output, but as a side effect means start/add/stop happen all at the same time from the perspective of the test result that's actually doing the timing.