Issue #18604: Consolidated checks for GUI availability.

test_support._is_gui_available is now defined the same way on every
platform, and now includes the Windows-specific check that had been in the
Windows version of _is_gui_available and the OSX-specific check that was
in tkinter.test.support.check_tk_availability.  Also, every platform
checks whether Tk can be instantiated (if the platform-specific checks
passed).
This commit is contained in:
Zachary Ware 2014-05-02 10:51:07 -05:00
parent 3d5c9e2c67
commit ceced6bfea
6 changed files with 64 additions and 73 deletions

View file

@ -6,8 +6,7 @@ support.import_module('_tkinter')
support.import_fresh_module('tkinter')
# Skip test if tk cannot be initialized.
from tkinter.test.support import check_tk_availability
check_tk_availability()
support.requires('gui')
from tkinter.test import runtktests