bpo-33987: IDLE - use ttk Frame for ttk widgets (GH-11395)

This commit is contained in:
Terry Jan Reedy 2019-01-02 22:04:06 -05:00 committed by GitHub
parent e9a044ec16
commit aff0adabf3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 38 additions and 28 deletions

View file

@ -4,7 +4,8 @@
import unittest
from test.support import requires
from tkinter import Tk, Frame ##, BooleanVar, StringVar
from tkinter import Tk
from tkinter.ttk import Frame
from idlelib import searchengine as se
from idlelib import searchbase as sdb
from idlelib.idle_test.mock_idle import Func
@ -97,11 +98,12 @@ class SearchDialogBaseTest(unittest.TestCase):
self.dialog.top = self.root
frame, label = self.dialog.make_frame()
self.assertEqual(label, '')
self.assertIsInstance(frame, Frame)
self.assertEqual(str(type(frame)), "<class 'tkinter.ttk.Frame'>")
# self.assertIsInstance(frame, Frame) fails when test is run by
# test_idle not run from IDLE editor. See issue 33987 PR.
frame, label = self.dialog.make_frame('testlabel')
self.assertEqual(label['text'], 'testlabel')
self.assertIsInstance(frame, Frame)
def btn_test_setup(self, meth):
self.dialog.top = self.root