Zachary Ware added the comment:

Here's a new version of the patch, post-#22236.  Serhiy, since you want this in 
2.7 and 3.4, this version doesn't move any files around (except 
Lib/test/test_tcl.py), which should make backporting easier.

I like this patch much better than the original, it's a much smaller diff and 
doesn't have to mess around with a 'setUpGUIModule' function.

The desegregation of test_tcl, test_tk, test_ttk_guionly and test_ttk_textonly 
is intentional: with the patch, all of the tests that require the gui are 
properly guarded by test.support.requires('gui'), and the ttk gui tests are 
additionally guarded by the new 'tkinter.test.support.check_ttk_availability' 
function (which I still have yet to test against Tk 8.4, but plan to shortly).  
This means that by doing 'python -m test test_tkinter', all gui-less tests are 
run (namely, the current test_tcl and test_ttk_textonly, and also 
test_variables) and all the gui tests are reported as skipped.  Meanwhile, 
doing 'python -m test -uall test_tkinter' or 'python -m tkinter.test', all 935 
tkinter tests are run (if a gui is in fact available).  Currently, the shortest 
invocation for running all of the tkinter tests that I know of is 'python -m 
test -uall test_tcl test_tk test_ttk_guionly test_ttk_textonly', which is quite 
a handful to type every time :).  If you really want the old subsets, they'
 re still available as 'python -m 
tkinter.test.test_(tcl|tkinter|ttk|ttk.test_functions)' (though 
'tkinter.test.test_ttk' will also run the 'ttk_textonly' tests).

----------
Added file: http://bugs.python.org/file36463/test_tkinter.v2.diff

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

Reply via email to