mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-36903: Fix ResourceWarning in test_logging (GH-13283)
This commit is contained in:
parent
c1f7262f70
commit
2c10538d11
1 changed files with 1 additions and 0 deletions
|
@ -684,6 +684,7 @@ class HandlerTest(BaseTest):
|
|||
|
||||
self.assertEqual(len(logging._handlers), 0)
|
||||
refed_h = _OurHandler()
|
||||
self.addCleanup(refed_h.sub_handler.stream.close)
|
||||
refed_h.name = 'because we need at least one for this test'
|
||||
self.assertGreater(len(logging._handlers), 0)
|
||||
self.assertGreater(len(logging._at_fork_reinit_lock_weakset), 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue