projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c1f7262
)
bpo-36903: Fix ResourceWarning in test_logging (GH-13283)
author
Xtreak
<tir.karthi@gmail.com>
Mon, 13 May 2019 14:48:52 +0000
(20:18 +0530)
committer
Victor Stinner
<vstinner@redhat.com>
Mon, 13 May 2019 14:48:51 +0000
(16:48 +0200)
Lib/test/test_logging.py
patch
|
blob
|
history
diff --git
a/Lib/test/test_logging.py
b/Lib/test/test_logging.py
index bc99c3adbe341619acdc9a66a8a6df87b416ed12..b884753ad397859000cdb4be5eeba1333634f6fb 100644
(file)
--- a/
Lib/test/test_logging.py
+++ b/
Lib/test/test_logging.py
@@
-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)