From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 27 Jun 2018 04:48:55 +0000 (-0700) Subject: bpo-33975: Avoid small type when running IDLE's htests. (GH-7944) X-Git-Tag: v3.6.7rc1~238 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d2d9d7c08819c7fbdfd7906858609e5070c20dd;p=python 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. (cherry picked from commit 3c8043d8fac4c0d05c0ba9e4e555e2f3165f2fe0) Co-authored-by: Terry Jan Reedy --- diff --git a/Lib/idlelib/idle_test/htest.py b/Lib/idlelib/idle_test/htest.py index 68eae67aff..95f6274392 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 diff --git a/Misc/NEWS.d/next/IDLE/2018-06-26-22-53-14.bpo-33975.Ow7alv.rst b/Misc/NEWS.d/next/IDLE/2018-06-26-22-53-14.bpo-33975.Ow7alv.rst new file mode 100644 index 0000000000..fd975bbff3 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2018-06-26-22-53-14.bpo-33975.Ow7alv.rst @@ -0,0 +1,3 @@ +Avoid small type when running htests. 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.