summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlend E. Aasland <erlend@python.org>2024-09-27 06:21:15 (GMT)
committerGitHub <noreply@github.com>2024-09-27 06:21:15 (GMT)
commit08e1bbe4a329e5961716f030c6ccfe92c736bf28 (patch)
tree273e55e57ac0db04f80cb407629e335fb9569ae5
parent25189188bfcb48be653eb9fb3aee892f2b9539b9 (diff)
downloadcpython-08e1bbe4a329e5961716f030c6ccfe92c736bf28.zip
cpython-08e1bbe4a329e5961716f030c6ccfe92c736bf28.tar.gz
cpython-08e1bbe4a329e5961716f030c6ccfe92c736bf28.tar.bz2
gh-86673: Harden `test_ttk.test_element_create_image` (#123335)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
-rw-r--r--Lib/test/test_ttk/test_style.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/test/test_ttk/test_style.py b/Lib/test/test_ttk/test_style.py
index 9a04a95..eeaf5de 100644
--- a/Lib/test/test_ttk/test_style.py
+++ b/Lib/test/test_ttk/test_style.py
@@ -227,13 +227,13 @@ class StyleTest(AbstractTkTest, unittest.TestCase):
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)