Chris Jerdonek added the comment:

I looked into this a bit.  It seems like this is because with the patch, the 
call to "loader.loadTestsFromModule(the_module)" inside regrtest comes before 
the try-finally:

http://hg.python.org/cpython/file/fcdb35b114ab/Lib/test/regrtest.py#l1277

whereas with the current code, the analogous test-loading code is part of 
test.support.run_unittest() and so is protected by the try-finally inside 
test_main().  Apparently, simply discovering/loading tests from 
test_concurrent_futures.py is enough to modify threading._dangling (e.g. when 
finding the tests to pass to load_tests).

I'm not sure yet what the right solution is, but it doesn't seem like test 
discovery should have that side effect.  It could be because of how 
test_concurrent_futures is written, or because of certain initialization code 
in one of the modules it depends on.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16968>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to