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 terry.reedy
Recipients georg.brandl, michael.foord, r.david.murray, terry.reedy, vstinner, xdegaye
Date 2014-10-18.02:59:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1413601199.98.0.33361478355.issue22607@psf.upfronthosting.co.za>
In-reply-to
Content
I believe the goal, and a better title, is "Automate leak discovery within a group of tests".  Bisection or dichotomy is a means, not a goal, and should not be part of the title.

"Leak discovery" means 'find a test within the group that has a leak (which we know or suspect might be occurring)'. 

'Test' can mean multiple modules, one module, one TestCase class, one test_xxx method, one subtest, or one assert.  What might it mean in 'group of tests'?  Pinning a leak on a particular statement likely has to be done manually; eliminate that.  On the other hand, it is feasible (see below) to automatically blame a particular test method and perhaps a particular subtest.  So interprete 'tests' as 'test methods or subtests'.

Unittest can run all test methods in a module, all test methods in a test class, or an individual test method.  Idle already has a module browser (Class Browser), based on stdlib's pyclbr and Idle's TreeWidget, that could be adapted (perhaps using ttk.Treeview instead) to produce a module-test_class-test tree.  Add buttons to select a particular leak test and others to select manual or auto nagivation of the tree and we might have something worthwhile.  It could go in Tools/Scripts or PyPI.

I have not used subtests yet since they are not available on 2.7, but I can imagine semi-automated editing, saving to a temp file, and running.  I would need experience with real subtest bisection to comment on the patch.
History
Date User Action Args
2014-10-18 03:00:00terry.reedysetrecipients: + terry.reedy, georg.brandl, vstinner, r.david.murray, michael.foord, xdegaye
2014-10-18 02:59:59terry.reedysetmessageid: <1413601199.98.0.33361478355.issue22607@psf.upfronthosting.co.za>
2014-10-18 02:59:59terry.reedylinkissue22607 messages
2014-10-18 02:59:59terry.reedycreate