Skip to content

Commit caaf939

Browse files
miss-islingtonerlend-aaslandserhiy-storchaka
authored
[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 08e1bbe) Co-authored-by: Erlend E. Aasland <erlend@python.org> Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent ac3e6f8 commit caaf939

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Lib/test/test_ttk/test_style.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,13 +227,13 @@ def test_element_create_image(self):
227227
foreground='blue', background='yellow')
228228
img3 = tkinter.BitmapImage(master=self.root, file=imgfile,
229229
foreground='white', background='black')
230-
style.element_create('Button.button', 'image',
230+
style.element_create('TestButton.button', 'image',
231231
img1, ('pressed', img2), ('active', img3),
232232
border=(2, 4), sticky='we')
233-
self.assertIn('Button.button', style.element_names())
233+
self.assertIn('TestButton.button', style.element_names())
234234

235-
style.layout('Button', [('Button.button', {'sticky': 'news'})])
236-
b = ttk.Button(self.root, style='Button')
235+
style.layout('TestButton', [('TestButton.button', {'sticky': 'news'})])
236+
b = ttk.Button(self.root, style='TestButton')
237237
b.pack(expand=True, fill='both')
238238
self.assertEqual(b.winfo_reqwidth(), 16)
239239
self.assertEqual(b.winfo_reqheight(), 16)

0 commit comments

Comments
 (0)