[Python-checkins] r73276 - in python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter: test_listbox.py test_menu.py test_scrollbar.py
guilherme.polo
python-checkins at python.org
Sun Jun 7 23:07:55 CEST 2009
Author: guilherme.polo
Date: Sun Jun 7 23:07:55 2009
New Revision: 73276
Log:
Adjusts for running properly under Windows.
Modified:
python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter/test_listbox.py
python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter/test_menu.py
python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter/test_scrollbar.py
Modified: python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter/test_listbox.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter/test_listbox.py (original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter/test_listbox.py Sun Jun 7 23:07:55 2009
@@ -75,7 +75,7 @@
self.lb.insert(0, *tuple(items))
self.assertTrue(isinstance(self.lb.nearest(10), int))
self.lb.pack()
- self.lb.update_idletasks()
+ self.lb.wait_visibility()
for i in range(0, self.lb.winfo_height(), 5):
item = self.lb.get(self.lb.nearest(i))
if item in items:
Modified: python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter/test_menu.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter/test_menu.py (original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter/test_menu.py Sun Jun 7 23:07:55 2009
@@ -1,3 +1,4 @@
+import sys
import unittest
import Tkinter
from test.test_support import requires, run_unittest
@@ -112,6 +113,9 @@
self.assertRaises(Tkinter.TclError, self.menu.invoke, -1)
def test_post_unpost(self):
+ if sys.platform == 'win32':
+ self.skipTest("Menu post blocks on Windows.")
+
self.menu.add_radiobutton(label='R')
self.menu.add_checkbutton(label='C')
Modified: python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter/test_scrollbar.py
==============================================================================
--- python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter/test_scrollbar.py (original)
+++ python/branches/tk_and_idle_maintenance/Lib/lib-tk/test/test_tkinter/test_scrollbar.py Sun Jun 7 23:07:55 2009
@@ -46,8 +46,8 @@
y_max = self.sb.winfo_height()
values = ['', 'arrow1', 'arrow2', 'slider']
- empty = self.sb.identify(0, 0)
- self.assertIn(empty, values)
+ empty = self.sb.identify(-1, -1)
+ self.assertEqual(empty, '')
values.remove(empty)
self.assertEqual(values, ['arrow1', 'arrow2', 'slider'])
arrow1 = self.sb.identify(x_mid, 5)
More information about the Python-checkins
mailing list