summaryrefslogtreecommitdiffstats
path: root/Lib/tkinter/test/test_ttk
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-10-09 10:28:02 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-10-09 10:28:02 (GMT)
commitf6c6e44eef80baa28afd9a0fb95998ef5d560659 (patch)
treef69a0ad581c568011b6a79de7cd7b12fb476df42 /Lib/tkinter/test/test_ttk
parent07f62a7702abd83c049dd34a5de7bf6c8dd3caf9 (diff)
downloadcpython-f6c6e44eef80baa28afd9a0fb95998ef5d560659.zip
cpython-f6c6e44eef80baa28afd9a0fb95998ef5d560659.tar.gz
cpython-f6c6e44eef80baa28afd9a0fb95998ef5d560659.tar.bz2
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. ........
Diffstat (limited to 'Lib/tkinter/test/test_ttk')
-rw-r--r--Lib/tkinter/test/test_ttk/test_widgets.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/tkinter/test/test_ttk/test_widgets.py b/Lib/tkinter/test/test_ttk/test_widgets.py
index fc3d1e5..35824ea 100644
--- a/Lib/tkinter/test/test_ttk/test_widgets.py
+++ b/Lib/tkinter/test/test_ttk/test_widgets.py
@@ -13,7 +13,7 @@ class WidgetTest(unittest.TestCase):
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 @@ class WidgetTest(unittest.TestCase):
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 @@ class NotebookTest(unittest.TestCase):
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 @@ class NotebookTest(unittest.TestCase):
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 @@ class TreeviewTest(unittest.TestCase):
def setUp(self):
support.root_deiconify()
- self.tv = ttk.Treeview()
+ self.tv = ttk.Treeview(padding=0)
def tearDown(self):
self.tv.destroy()