summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2018-06-27 04:07:30 (GMT)
committerGitHub <noreply@github.com>2018-06-27 04:07:30 (GMT)
commit3c8043d8fac4c0d05c0ba9e4e555e2f3165f2fe0 (patch)
tree4c0bb679631ac5c7894f7f78498dba07819327c6 /Lib
parentdf748c20dabcec5a6e89e0dd74fff21110f8755a (diff)
downloadcpython-3c8043d8fac4c0d05c0ba9e4e555e2f3165f2fe0.zip
cpython-3c8043d8fac4c0d05c0ba9e4e555e2f3165f2fe0.tar.gz
cpython-3c8043d8fac4c0d05c0ba9e4e555e2f3165f2fe0.tar.bz2
bpo-33975: Avoid small type when running IDLE's htests. (GH-7944)
Import pyshell first in htest to call SetProcessDpiAwareness on Windows before tkinter.Tk() is called for the htest. Apparently, 'root.destroy()' undoes a previous 'root = Tk()'. Since IDLE unittests always destroy roots, a unittest before an htest does not require anything more to work right. Since part of the purpose of human-viewed tests is to determine that widgets look right, it is important that they look the same for testing as when running IDLE.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/idlelib/idle_test/htest.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/idlelib/idle_test/htest.py b/Lib/idlelib/idle_test/htest.py
index 68eae67..95f6274 100644
--- a/Lib/idlelib/idle_test/htest.py
+++ b/Lib/idlelib/idle_test/htest.py
@@ -65,6 +65,7 @@ autocomplete_w.AutoCompleteWindow
outwin.OutputWindow (indirectly being tested with grep test)
'''
+import idlelib.pyshell # Set Windows DPI awareness before Tk().
from importlib import import_module
import tkinter as tk
from tkinter.ttk import Scrollbar