Skip to content

Commit 32adddb

Browse files
authored
[3.6] Improve comments in test_idle.py. (GH-7057) (GH-7060)
(cherry picked from commit 2a6d5da)
1 parent 2baee0a commit 32adddb

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

Lib/test/test_idle.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
import unittest
22
from test.support import import_module
33

4-
# Skip test if _thread or _tkinter wasn't built, if idlelib is missing,
5-
# or if tcl/tk is not the 8.5+ needed for ttk widgets.
6-
import_module('threading') # imported by PyShell, imports _thread
4+
# For 3.6, skip test_idle if threads are not supported.
5+
import_module('threading') # Imported by PyShell, imports _thread.
6+
7+
# Skip test_idle if _tkinter wasn't built, if tkinter is missing,
8+
# if tcl/tk is not the 8.5+ needed for ttk widgets,
9+
# or if idlelib is missing (not installed).
710
tk = import_module('tkinter') # imports _tkinter
811
if tk.TkVersion < 8.5:
912
raise unittest.SkipTest("IDLE requires tk 8.5 or later.")
1013
idlelib = import_module('idlelib')
1114

12-
# Before test imports, tell IDLE to avoid changing the environment.
15+
# Before importing and executing more of idlelib,
16+
# tell IDLE to avoid changing the environment.
1317
idlelib.testing = True
1418

15-
# unittest.main and test.libregrtest.runtest.runtest_inner
16-
# call load_tests, when present, to discover tests to run.
19+
# Unittest.main and test.libregrtest.runtest.runtest_inner
20+
# call load_tests, when present here, to discover tests to run.
1721
from idlelib.idle_test import load_tests
1822

1923
if __name__ == '__main__':

0 commit comments

Comments
 (0)