From: Vinay Sajip Date: Mon, 2 May 2011 13:43:00 +0000 (+0100) Subject: Improved thread interlocks in tests. X-Git-Tag: v3.3.0a1~2431^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=714b8dc501067d9ceccc8e07517b4d8a4b4465df;p=thirdparty%2FPython%2Fcpython.git Improved thread interlocks in tests. --- diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 96f82151b60b..7a723e0e08d9 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.')