Kaydet (Commit) 2c10538d authored tarafından Xtreak's avatar Xtreak Kaydeden (comit) Victor Stinner

bpo-36903: Fix ResourceWarning in test_logging (GH-13283)

üst c1f7262f
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment