[issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit
Guilherme Polo
report at bugs.python.org
Thu Apr 8 14:55:39 CEST 2010
Guilherme Polo <ggpolo at gmail.com> added the comment:
> Martin v. Löwis added the comment:
>
> I can reproduce the problem. The root cause is that the "event generate .nb <Control-Tab>" simply does not have any effect - neither through Python, nor through directly wish. Nor do any of the other keys that supposedly cycle through the notebook, when send through "event generate". Typing them directly works fine.
>
Could it be caused because the notebook is not focused at the correct
time ? Here in OSX (finally I have one of these) I had to add
self.nb.focus() before that event_generate.
The attached patch is for trunk.
----------
keywords: +patch
Added file: http://bugs.python.org/file16818/p1.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8204>
_______________________________________
-------------- next part --------------
Index: Lib/lib-tk/test/test_ttk/test_widgets.py
===================================================================
--- Lib/lib-tk/test/test_ttk/test_widgets.py (revision 79905)
+++ Lib/lib-tk/test/test_ttk/test_widgets.py (working copy)
@@ -704,6 +704,7 @@
self.nb.select(0)
support.simulate_mouse_click(self.nb, 5, 5)
+ self.nb.focus()
self.nb.event_generate('<Control-Tab>')
self.assertEqual(self.nb.select(), str(self.child2))
self.nb.event_generate('<Shift-Control-Tab>')
More information about the Python-bugs-list
mailing list