[Python-checkins] r69470 - python/trunk/Lib/test/test_tk.py
guilherme.polo
python-checkins at python.org
Mon Feb 9 20:57:04 CET 2009
Author: guilherme.polo
Date: Mon Feb 9 20:57:04 2009
New Revision: 69470
Log:
Checking for tk availability before continuing (basically the same that is done in test_ttk_guionly)
Modified:
python/trunk/Lib/test/test_tk.py
Modified: python/trunk/Lib/test/test_tk.py
==============================================================================
--- python/trunk/Lib/test/test_tk.py (original)
+++ python/trunk/Lib/test/test_tk.py Mon Feb 9 20:57:04 2009
@@ -1,8 +1,14 @@
import os
import sys
-from _tkinter import TclError
+import Tkinter
from test import test_support
+try:
+ Tkinter.Button()
+except Tkinter.TclError, msg:
+ # assuming tk is not available
+ raise test_support.TestSkipped("tk not available: %s" % msg)
+
this_dir = os.path.dirname(os.path.abspath(__file__))
lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir,
'lib-tk', 'test'))
More information about the Python-checkins
mailing list