mirror of https://github.com/python/cpython
Improved thread interlocks in tests.
This commit is contained in:
parent
314b92b26e
commit
714b8dc501
|
@ -1385,7 +1385,10 @@ class DatagramHandlerTest(BaseTest):
|
||||||
logger = logging.getLogger("udp")
|
logger = logging.getLogger("udp")
|
||||||
logger.error("spam")
|
logger.error("spam")
|
||||||
self.handled.wait()
|
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.')
|
@unittest.skipUnless(threading, 'Threading required for this test.')
|
||||||
|
|
Loading…
Reference in New Issue