https://github.com/python/cpython/commit/caaf939fe2d296473940d1109fcd1025425b2d3f commit: caaf939fe2d296473940d1109fcd1025425b2d3f branch: 3.13 author: Miss Islington (bot) <[email protected]> committer: Yhg1s <[email protected]> date: 2024-09-27T11:09:15-07:00 summary:
[3.13] gh-86673: Harden `test_ttk.test_element_create_image` (GH-123335) (#124654) gh-86673: Harden `test_ttk.test_element_create_image` (GH-123335) (cherry picked from commit 08e1bbe4a329e5961716f030c6ccfe92c736bf28) Co-authored-by: Erlend E. Aasland <[email protected]> Co-authored-by: Serhiy Storchaka <[email protected]> files: M Lib/test/test_ttk/test_style.py diff --git a/Lib/test/test_ttk/test_style.py b/Lib/test/test_ttk/test_style.py index 9a04a95dc40d65..eeaf5de2e303f6 100644 --- a/Lib/test/test_ttk/test_style.py +++ b/Lib/test/test_ttk/test_style.py @@ -227,13 +227,13 @@ def test_element_create_image(self): foreground='blue', background='yellow') img3 = tkinter.BitmapImage(master=self.root, file=imgfile, foreground='white', background='black') - style.element_create('Button.button', 'image', + style.element_create('TestButton.button', 'image', img1, ('pressed', img2), ('active', img3), border=(2, 4), sticky='we') - self.assertIn('Button.button', style.element_names()) + self.assertIn('TestButton.button', style.element_names()) - style.layout('Button', [('Button.button', {'sticky': 'news'})]) - b = ttk.Button(self.root, style='Button') + style.layout('TestButton', [('TestButton.button', {'sticky': 'news'})]) + b = ttk.Button(self.root, style='TestButton') b.pack(expand=True, fill='both') self.assertEqual(b.winfo_reqwidth(), 16) self.assertEqual(b.winfo_reqheight(), 16) _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-checkins.python.org/ Member address: [email protected]
