From 7a77ee88af00b853aae328dbb3c87d91a1313052 Mon Sep 17 00:00:00 2001 From: Guilherme Polo Date: Wed, 28 Jan 2009 19:28:04 +0000 Subject: * 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. --- Lib/test/regrtest.py | 8 ++++++++ Lib/test/test_tk_guionly.py | 23 ----------------------- Lib/test/test_tk_textonly.py | 16 ---------------- Lib/test/test_ttk_guionly.py | 32 ++++++++++++++++++++++++++++++++ Lib/test/test_ttk_textonly.py | 17 +++++++++++++++++ 5 files changed, 57 insertions(+), 39 deletions(-) delete mode 100644 Lib/test/test_tk_guionly.py delete mode 100644 Lib/test/test_tk_textonly.py create mode 100644 Lib/test/test_ttk_guionly.py create mode 100644 Lib/test/test_ttk_textonly.py 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_tk_guionly.py deleted file mode 100644 index c563730..0000000 --- a/Lib/test/test_tk_guionly.py +++ /dev/null @@ -1,23 +0,0 @@ -import os -import sys -from test import test_support - -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')) -if lib_tk_test not in sys.path: - sys.path.append(lib_tk_test) - -import runtktests - -def test_main(enable_gui=False): - if enable_gui: - if test_support.use_resources is None: - test_support.use_resources = ['gui'] - elif 'gui' not in test_support.use_resources: - test_support.use_resources.append('gui') - - test_support.run_unittest(*runtktests.get_tests(text=False)) - -if __name__ == '__main__': - test_main(enable_gui=True) diff --git a/Lib/test/test_tk_textonly.py b/Lib/test/test_tk_textonly.py deleted file mode 100644 index 1a8df2be..0000000 --- a/Lib/test/test_tk_textonly.py +++ /dev/null @@ -1,16 +0,0 @@ -import os -import sys -from test import test_support - -this_dir = os.path.dirname(os.path.abspath(__file__)) -lib_tk_test = os.path.abspath(os.path.join(this_dir, '..', 'lib-tk', 'test')) -if lib_tk_test not in sys.path: - sys.path.append(lib_tk_test) - -import runtktests - -def test_main(): - test_support.run_unittest(*runtktests.get_tests(gui=False)) - -if __name__ == '__main__': - test_main() diff --git a/Lib/test/test_ttk_guionly.py b/Lib/test/test_ttk_guionly.py new file mode 100644 index 0000000..6691b88 --- /dev/null +++ b/Lib/test/test_ttk_guionly.py @@ -0,0 +1,32 @@ +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')) +if lib_tk_test not in sys.path: + sys.path.append(lib_tk_test) + +import runtktests + +def test_main(enable_gui=False): + if enable_gui: + if test_support.use_resources is None: + test_support.use_resources = ['gui'] + elif 'gui' not in test_support.use_resources: + test_support.use_resources.append('gui') + + 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_ttk_textonly.py b/Lib/test/test_ttk_textonly.py new file mode 100644 index 0000000..e7d9c00 --- /dev/null +++ b/Lib/test/test_ttk_textonly.py @@ -0,0 +1,17 @@ +import os +import sys +from test import test_support + +this_dir = os.path.dirname(os.path.abspath(__file__)) +lib_tk_test = os.path.abspath(os.path.join(this_dir, '..', 'lib-tk', 'test')) +if lib_tk_test not in sys.path: + sys.path.append(lib_tk_test) + +import runtktests + +def test_main(): + test_support.run_unittest( + *runtktests.get_tests(gui=False, packages=['test_ttk'])) + +if __name__ == '__main__': + test_main() -- cgit v0.12