Terry J. Reedy added the comment:

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.

----------
nosy: +terry.reedy
stage:  -> test needed

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

Reply via email to