]> granicus.if.org Git - python/commitdiff
Improved thread interlocks in tests.
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Mon, 2 May 2011 13:43:00 +0000 (14:43 +0100)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Mon, 2 May 2011 13:43:00 +0000 (14:43 +0100)
Lib/test/test_logging.py

index 96f82151b60b9c9efd93fca9c98afb4d5227b042..7a723e0e08d97920129a8ea365ebf7e4d3e60669 100644 (file)
@@ -1385,7 +1385,10 @@ class DatagramHandlerTest(BaseTest):
         logger = logging.getLogger("udp")
         logger.error("spam")
         self.handled.wait()
-        self.assertEqual(self.log_output, "spam\n")
+        self.handled.clear()
+        logger.error("eggs")
+        self.handled.wait()
+        self.assertEqual(self.log_output, "spam\neggs\n")
 
 
 @unittest.skipUnless(threading, 'Threading required for this test.')