Commit 92fa6e7b authored by Terry Jan Reedy's avatar Terry Jan Reedy

Issue #18441: Comment out code that will not compile because the standard

library has a package, lib-tk, that cannot be imported by normal means.
Lib/test/test_tk, etc, have special code to access this package.  I will not
bother with it unless the darwin check is needed before it gets moved to
test.(test-)support.py.
parent 71f69a4b
...@@ -12,13 +12,14 @@ idletest = import_module('idlelib.idle_test') ...@@ -12,13 +12,14 @@ idletest = import_module('idlelib.idle_test')
if use_resources and 'gui' in use_resources: if use_resources and 'gui' in use_resources:
try: try:
import sys import sys
if sys.platform == 'darwin': ## if sys.platform == 'darwin':
from lib-tk.test.runtktests import check_tk_availability ## from lib-tk.test.runtktests import check_tk_availability
# tkinter.test.suppport in 3.x # see test/test_tk.py or test_ttk_guionly for how to import the above
try: ## # tkinter.test.suppport in 3.x
check_tk_availability() ## try:
except unittest.SkipTest: ## check_tk_availability()
raise tk.TclError ## except unittest.SkipTest:
## raise tk.TclError
root = tk.Tk() root = tk.Tk()
root.destroy() root.destroy()
except tk.TclError: except tk.TclError:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment