From 714b8dc501067d9ceccc8e07517b4d8a4b4465df Mon Sep 17 00:00:00 2001 From: Vinay Sajip Date: Mon, 2 May 2011 14:43:00 +0100 Subject: [PATCH] Improved thread interlocks in tests. --- Lib/test/test_logging.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 96f82151b60..7a723e0e08d 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -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.')