mirror of
https://github.com/python/cpython.git
synced 2025-11-26 21:33:10 +00:00
Improved thread interlocks in tests.
This commit is contained in:
parent
314b92b26e
commit
714b8dc501
1 changed files with 4 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue