summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilherme Polo <ggpolo@gmail.com>2009-01-28 19:28:04 (GMT)
committerGuilherme Polo <ggpolo@gmail.com>2009-01-28 19:28:04 (GMT)
commit7a77ee88af00b853aae328dbb3c87d91a1313052 (patch)
tree2cbd019a4616a86fe398e844cb81e884989249d0
parent6785cf0169a1213f15549374361801185de8a8b0 (diff)
downloadcpython-7a77ee88af00b853aae328dbb3c87d91a1313052.zip
cpython-7a77ee88af00b853aae328dbb3c87d91a1313052.tar.gz
cpython-7a77ee88af00b853aae328dbb3c87d91a1313052.tar.bz2
* Renaming test_tk_* to test_ttk_* since that is what they are testing.
* Added ttk tests to the expected skips mapping just like where test_tcl was expected to be skipped too.
-rwxr-xr-xLib/test/regrtest.py8
-rw-r--r--Lib/test/test_ttk_guionly.py (renamed from Lib/test/test_tk_guionly.py)11
-rw-r--r--Lib/test/test_ttk_textonly.py (renamed from Lib/test/test_tk_textonly.py)3
3 files changed, 20 insertions, 2 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 996395b..faa308c 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -1045,6 +1045,8 @@ _expectations = {
test_socket_ssl
test_socketserver
test_tcl
+ test_ttk_guionly
+ test_ttk_textonly
test_timeout
test_urllibnet
test_multiprocessing
@@ -1062,6 +1064,8 @@ _expectations = {
test_kqueue
test_ossaudiodev
test_tcl
+ test_ttk_guionly
+ test_ttk_textonly
test_zipimport
test_zlib
""",
@@ -1078,6 +1082,8 @@ _expectations = {
test_ossaudiodev
test_pep277
test_tcl
+ test_ttk_guionly
+ test_ttk_textonly
test_multiprocessing
""",
'netbsd3':
@@ -1094,6 +1100,8 @@ _expectations = {
test_ossaudiodev
test_pep277
test_tcl
+ test_ttk_guionly
+ test_ttk_textonly
test_multiprocessing
""",
}
diff --git a/Lib/test/test_tk_guionly.py b/Lib/test/test_ttk_guionly.py
index c563730..6691b88 100644
--- a/Lib/test/test_tk_guionly.py
+++ b/Lib/test/test_ttk_guionly.py
@@ -1,7 +1,15 @@
import os
import sys
+import ttk
+from _tkinter import TclError
from test import test_support
+try:
+ ttk.Button()
+except TclError, msg:
+ # assuming ttk is not available
+ raise test_support.TestSkipped("ttk 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'))
@@ -17,7 +25,8 @@ def test_main(enable_gui=False):
elif 'gui' not in test_support.use_resources:
test_support.use_resources.append('gui')
- test_support.run_unittest(*runtktests.get_tests(text=False))
+ test_support.run_unittest(
+ *runtktests.get_tests(text=False, packages=['test_ttk']))
if __name__ == '__main__':
test_main(enable_gui=True)
diff --git a/Lib/test/test_tk_textonly.py b/Lib/test/test_ttk_textonly.py
index 1a8df2be..e7d9c00 100644
--- a/Lib/test/test_tk_textonly.py
+++ b/Lib/test/test_ttk_textonly.py
@@ -10,7 +10,8 @@ if lib_tk_test not in sys.path:
import runtktests
def test_main():
- test_support.run_unittest(*runtktests.get_tests(gui=False))
+ test_support.run_unittest(
+ *runtktests.get_tests(gui=False, packages=['test_ttk']))
if __name__ == '__main__':
test_main()