mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
* 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.
This commit is contained in:
parent
6785cf0169
commit
7a77ee88af
3 changed files with 20 additions and 2 deletions
|
@ -1045,6 +1045,8 @@ _expectations = {
|
||||||
test_socket_ssl
|
test_socket_ssl
|
||||||
test_socketserver
|
test_socketserver
|
||||||
test_tcl
|
test_tcl
|
||||||
|
test_ttk_guionly
|
||||||
|
test_ttk_textonly
|
||||||
test_timeout
|
test_timeout
|
||||||
test_urllibnet
|
test_urllibnet
|
||||||
test_multiprocessing
|
test_multiprocessing
|
||||||
|
@ -1062,6 +1064,8 @@ _expectations = {
|
||||||
test_kqueue
|
test_kqueue
|
||||||
test_ossaudiodev
|
test_ossaudiodev
|
||||||
test_tcl
|
test_tcl
|
||||||
|
test_ttk_guionly
|
||||||
|
test_ttk_textonly
|
||||||
test_zipimport
|
test_zipimport
|
||||||
test_zlib
|
test_zlib
|
||||||
""",
|
""",
|
||||||
|
@ -1078,6 +1082,8 @@ _expectations = {
|
||||||
test_ossaudiodev
|
test_ossaudiodev
|
||||||
test_pep277
|
test_pep277
|
||||||
test_tcl
|
test_tcl
|
||||||
|
test_ttk_guionly
|
||||||
|
test_ttk_textonly
|
||||||
test_multiprocessing
|
test_multiprocessing
|
||||||
""",
|
""",
|
||||||
'netbsd3':
|
'netbsd3':
|
||||||
|
@ -1094,6 +1100,8 @@ _expectations = {
|
||||||
test_ossaudiodev
|
test_ossaudiodev
|
||||||
test_pep277
|
test_pep277
|
||||||
test_tcl
|
test_tcl
|
||||||
|
test_ttk_guionly
|
||||||
|
test_ttk_textonly
|
||||||
test_multiprocessing
|
test_multiprocessing
|
||||||
""",
|
""",
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,15 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import ttk
|
||||||
|
from _tkinter import TclError
|
||||||
from test import test_support
|
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__))
|
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 = os.path.abspath(os.path.join(this_dir, os.path.pardir,
|
||||||
'lib-tk', 'test'))
|
'lib-tk', 'test'))
|
||||||
|
@ -17,7 +25,8 @@ def test_main(enable_gui=False):
|
||||||
elif 'gui' not in test_support.use_resources:
|
elif 'gui' not in test_support.use_resources:
|
||||||
test_support.use_resources.append('gui')
|
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__':
|
if __name__ == '__main__':
|
||||||
test_main(enable_gui=True)
|
test_main(enable_gui=True)
|
|
@ -10,7 +10,8 @@ if lib_tk_test not in sys.path:
|
||||||
import runtktests
|
import runtktests
|
||||||
|
|
||||||
def test_main():
|
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__':
|
if __name__ == '__main__':
|
||||||
test_main()
|
test_main()
|
Loading…
Add table
Add a link
Reference in a new issue