mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
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:
parent
3d5c9e2c67
commit
ceced6bfea
6 changed files with 64 additions and 73 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue