From e84089e3f1000ba1d060931e416dc148fe79d6eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 8 Apr 2010 17:38:32 +0000 Subject: [PATCH] Issue #8204: Fix test_ttk notebook test by forcing focus. --- Lib/lib-tk/test/test_ttk/test_widgets.py | 4 ++++ Misc/NEWS | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Lib/lib-tk/test/test_ttk/test_widgets.py b/Lib/lib-tk/test/test_ttk/test_widgets.py index 4b97a0ec54f..2d9fc9b5ef2 100644 --- a/Lib/lib-tk/test/test_ttk/test_widgets.py +++ b/Lib/lib-tk/test/test_ttk/test_widgets.py @@ -704,15 +704,19 @@ class NotebookTest(unittest.TestCase): self.nb.select(0) support.simulate_mouse_click(self.nb, 5, 5) + self.nb.focus_force() self.nb.event_generate('') self.assertEqual(self.nb.select(), str(self.child2)) + self.nb.focus_force() self.nb.event_generate('') self.assertEqual(self.nb.select(), str(self.child1)) + self.nb.focus_force() self.nb.event_generate('') self.assertEqual(self.nb.select(), str(self.child2)) self.nb.tab(self.child1, text='a', underline=0) self.nb.enable_traversal() + self.nb.focus_force() self.nb.event_generate('') self.assertEqual(self.nb.select(), str(self.child1)) diff --git a/Misc/NEWS b/Misc/NEWS index 1630e8807b3..3aff2a8e502 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -58,6 +58,8 @@ Core and Builtins Library ------- +- Issue #8204: Fix test_ttk notebook test by forcing focus. + - Issue #8344: Fix test_ttk bug on FreeBSD. - Issue #8321: Give access to OpenSSL version numbers from the `ssl` module,