Improved thread interlocks in tests.

This commit is contained in:
Vinay Sajip 2011-05-02 14:43:00 +01:00
parent 314b92b26e
commit 714b8dc501
1 changed files with 4 additions and 1 deletions

View 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.')