[Python-checkins] r85338 - in python/branches/release31-maint: Lib/tkinter/test/test_ttk/test_widgets.py

antoine.pitrou python-checkins at python.org
Sat Oct 9 12:28:02 CEST 2010


Author: antoine.pitrou
Date: Sat Oct  9 12:28:02 2010
New Revision: 85338

Log:
Merged revisions 85018 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r85018 | antoine.pitrou | 2010-09-26 18:36:33 +0200 (dim., 26 sept. 2010) | 4 lines
  
  Issue #8445: try to fix some buildbot failures on test_ttk_guionly.
  Patch by Guilherme.
........


Modified:
   python/branches/release31-maint/   (props changed)
   python/branches/release31-maint/Lib/tkinter/test/test_ttk/test_widgets.py

Modified: python/branches/release31-maint/Lib/tkinter/test/test_ttk/test_widgets.py
==============================================================================
--- python/branches/release31-maint/Lib/tkinter/test/test_ttk/test_widgets.py	(original)
+++ python/branches/release31-maint/Lib/tkinter/test/test_ttk/test_widgets.py	Sat Oct  9 12:28:02 2010
@@ -13,7 +13,7 @@
 
     def setUp(self):
         support.root_deiconify()
-        self.widget = ttk.Button()
+        self.widget = ttk.Button(width=0, text="Text")
         self.widget.pack()
         self.widget.wait_visibility()
 
@@ -24,7 +24,10 @@
 
     def test_identify(self):
         self.widget.update_idletasks()
-        self.assertEqual(self.widget.identify(5, 5), "label")
+        self.assertEqual(self.widget.identify(
+            int(self.widget.winfo_width() / 2),
+            int(self.widget.winfo_height() / 2)
+            ), "label")
         self.assertEqual(self.widget.identify(-1, -1), "")
 
         self.assertRaises(tkinter.TclError, self.widget.identify, None, 5)
@@ -530,7 +533,7 @@
 
     def setUp(self):
         support.root_deiconify()
-        self.nb = ttk.Notebook()
+        self.nb = ttk.Notebook(padding=0)
         self.child1 = ttk.Label()
         self.child2 = ttk.Label()
         self.nb.add(self.child1, text='a')
@@ -717,6 +720,7 @@
         self.nb.tab(self.child1, text='a', underline=0)
         self.nb.enable_traversal()
         self.nb.focus_force()
+        support.simulate_mouse_click(self.nb, 5, 5)
         self.nb.event_generate('<Alt-a>')
         self.assertEqual(self.nb.select(), str(self.child1))
 
@@ -725,7 +729,7 @@
 
     def setUp(self):
         support.root_deiconify()
-        self.tv = ttk.Treeview()
+        self.tv = ttk.Treeview(padding=0)
 
     def tearDown(self):
         self.tv.destroy()


More information about the Python-checkins mailing list