This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients brett.cannon, chris.jerdonek, ezio.melotti, zach.ware
Date 2013-01-24.22:30:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1359066650.55.0.607886301301.issue16968@psf.upfronthosting.co.za>
In-reply-to
Content
I'm at a loss on this one.  I tried a few different methods of wrapping the tests in load_tests(), I tried doing support.threading_setup() in setUpModule and support.threading_cleanup() in tearDownModule, tried the same in each test class (following the example of test_asynchat.TestAsynchat).  Every way I've tried, I still get the warning that threading._dangling was modified when running the test as part of regrtest, even though it appears that everything is getting called at the right time with the right arguments.

I did just stumble onto something interesting: if you simply remove the decorator and finally clause from test_main and run it (with the initial discovery patch applied), there is no warning at the end.  Remove test_main and there's the warning.  Add a load_tests that builds a suite in what appears to be the same order as what support.run_unittest does, and the warning is still there.  I can't find what makes the difference.

The attached diff is the best I've come up with that seems to do the right things with the reap functions, but still causes the warning on my machine.

Am I missing something obvious here or what?
History
Date User Action Args
2013-01-24 22:30:50zach.waresetrecipients: + zach.ware, brett.cannon, ezio.melotti, chris.jerdonek
2013-01-24 22:30:50zach.waresetmessageid: <1359066650.55.0.607886301301.issue16968@psf.upfronthosting.co.za>
2013-01-24 22:30:50zach.warelinkissue16968 messages
2013-01-24 22:30:50zach.warecreate