support.threading_cleanup() log a warning on fail (#1195)

The @reap_threads decorator and the threading_cleanup() function of
test.support now log a warning if they fail to clenaup threads.

Fix also the usage of support.threading_cleanup() in
test_urllib2_localnet.

The log may help to debug such other warning seen on the AMD64
FreeBSD CURRENT Non-Debug 3.x buildbot:

Warning -- threading._dangling was modified by test_logging
This commit is contained in:
Victor Stinner 2017-04-20 13:40:08 +02:00 committed by GitHub
parent b85c136903
commit d20324a7fa
2 changed files with 9 additions and 2 deletions

View file

@ -664,7 +664,7 @@ def setUpModule():
def tearDownModule():
if threads_key:
support.threading_cleanup(threads_key)
support.threading_cleanup(*threads_key)
if __name__ == "__main__":
unittest.main()