[Python-checkins] cpython: Improved thread interlocks in tests.

vinay.sajip python-checkins at python.org
Mon May 2 15:43:08 CEST 2011


http://hg.python.org/cpython/rev/7fe328d0fa5f
changeset: 69780:7fe328d0fa5f
user: Vinay Sajip <vinay_sajip at yahoo.co.uk>
date: Mon May 02 14:43:00 2011 +0100
summary:
 Improved thread interlocks in tests.
files:
 Lib/test/test_logging.py | 5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -1385,7 +1385,10 @@
 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.')
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /