mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
gh-114706: Allow QueueListener.stop() to be called more than once. (GH-114748)
This commit is contained in:
parent
ea30a28c3e
commit
e21754d7f8
2 changed files with 5 additions and 3 deletions
|
@ -4089,6 +4089,7 @@ class QueueHandlerTest(BaseTest):
|
|||
self.que_logger.critical(self.next_message())
|
||||
finally:
|
||||
listener.stop()
|
||||
listener.stop() # gh-114706 - ensure no crash if called again
|
||||
self.assertTrue(handler.matches(levelno=logging.WARNING, message='1'))
|
||||
self.assertTrue(handler.matches(levelno=logging.ERROR, message='2'))
|
||||
self.assertTrue(handler.matches(levelno=logging.CRITICAL, message='3'))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue