https://github.com/python/cpython/commit/4d38254e20b0def7e29271a6fe0516d7e91b1fa3
commit: 4d38254e20b0def7e29271a6fe0516d7e91b1fa3
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: erlend-aasland <[email protected]>
date: 2024-09-27T06:48:00Z
summary:

[3.12] gh-86673: Harden `test_ttk.test_element_create_image` (GH-123335) 
(#124655)

(cherry picked from commit 08e1bbe4a329e5961716f030c6ccfe92c736bf28)

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 2b13186280e313..5de29a395cf75d 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]

Reply via email to