[issue16897] Fix test discovery for test_bisect.py

2013-01-09 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the patch! While I was at it I also added the other example from the doc. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue16897] Fix test discovery for test_bisect.py

2013-01-09 Thread Roundup Robot
Roundup Robot added the comment: New changeset f32cb5389a4b by Ezio Melotti in branch '3.3': #16897: test_bisect now works with unittest test discovery. Initial patch by Zachary Ware. http://hg.python.org/cpython/rev/f32cb5389a4b New changeset cfd8d99ae645 by Ezio Melotti in branch 'default':

[issue16897] Fix test discovery for test_bisect.py

2013-01-09 Thread Zachary Ware
Zachary Ware added the comment: Here's version 2 of the patch, which converts the doctests to a standard testcase and removes test_main(). -- Added file: http://bugs.python.org/file28651/test_bisect_fix.v2.diff ___ Python tracker

[issue16897] Fix test discovery for test_bisect.py

2013-01-08 Thread Ezio Melotti
Ezio Melotti added the comment: I think that here all the test_main() can be removed except support.run_doctest(test_bisect, verbose). This should probably be moved after unittest.main() (unless the doctests are removed/converted to unittest). Refcounting is already provided by regrtest. --

[issue16897] Fix test discovery for test_bisect.py

2013-01-08 Thread Zachary Ware
Zachary Ware added the comment: > A general comment about these patches: I think it would be better to remove test_main() (and related unnecessary code) with unittest.main(). One of the advantage of doing it now is that you can simply test discovery by doing ./python Lib/test/test_foo.py. > > Th

[issue16897] Fix test discovery for test_bisect.py

2013-01-08 Thread Ezio Melotti
Ezio Melotti added the comment: The best thing would be converting them to unittest (if there aren't already unittests for that). A general comment about these patches: I think it would be better to remove test_main() (and related unnecessary code) with unittest.main(). One of the advantage

[issue16897] Fix test discovery for test_bisect.py

2013-01-08 Thread Zachary Ware
New submission from Zachary Ware: Here's the fix for test_bisect.py. This one has an extra change, that of replacing the manual method of obtaining c_bisect and py_bisect with two calls to support.import_fresh_module. This one also has an extra wrench thrown in the gears by including a few do