mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 05:42:29 +00:00
python-3.6.zip added from Github
README.cosmo contains the necessary links.
This commit is contained in:
parent
75fc601ff5
commit
0c4c56ff39
4219 changed files with 1968626 additions and 0 deletions
27
third_party/python/Lib/test/test_idle.py
vendored
Normal file
27
third_party/python/Lib/test/test_idle.py
vendored
Normal file
|
@ -0,0 +1,27 @@
|
|||
import unittest
|
||||
from test.support import import_module
|
||||
|
||||
# For 3.6, skip test_idle if threads are not supported.
|
||||
import_module('threading') # Imported by PyShell, imports _thread.
|
||||
|
||||
# Skip test_idle if _tkinter wasn't built, if tkinter is missing,
|
||||
# if tcl/tk is not the 8.5+ needed for ttk widgets,
|
||||
# or if idlelib is missing (not installed).
|
||||
tk = import_module('tkinter') # imports _tkinter
|
||||
if tk.TkVersion < 8.5:
|
||||
raise unittest.SkipTest("IDLE requires tk 8.5 or later.")
|
||||
idlelib = import_module('idlelib')
|
||||
|
||||
# Before importing and executing more of idlelib,
|
||||
# tell IDLE to avoid changing the environment.
|
||||
idlelib.testing = True
|
||||
|
||||
# Unittest.main and test.libregrtest.runtest.runtest_inner
|
||||
# call load_tests, when present here, to discover tests to run.
|
||||
from idlelib.idle_test import load_tests
|
||||
|
||||
if __name__ == '__main__':
|
||||
tk.NoDefaultRoot()
|
||||
unittest.main(exit=False)
|
||||
tk._support_default_root = 1
|
||||
tk._default_root = None
|
Loading…
Add table
Add a link
Reference in a new issue