def setUp(self):
     TestWithFakeExceptions.setUp(self)
     self.result_semaphore = threading.Semaphore(1)
     self.target = LoggingResult([])
     self.result1 = ThreadsafeForwardingResult(self.target,
         self.result_semaphore)
 def test_stopTestRun(self):
     self.result1.stopTestRun()
     self.result2 = ThreadsafeForwardingResult(self.target,
         self.result_semaphore)
     self.result2.stopTestRun()
     self.assertEqual(["stopTestRun", "stopTestRun"], self.target._events)
 def makeResult(self):
     result_semaphore = threading.Semaphore(1)
     target = TestResult()
     return ThreadsafeForwardingResult(target, result_semaphore)