[Python-checkins] bpo-30855: Fix winfo_id related Tkinter test on Windows. (#4121)

Serhiy Storchaka webhook-mailer at python.org
Wed Oct 25 17:28:08 EDT 2017


https://github.com/python/cpython/commit/7c622be4f2e86c1999baba4f64671a5987d43d73
commit: 7c622be4f2e86c1999baba4f64671a5987d43d73
branch: 2.7
author: Serhiy Storchaka <storchaka at gmail.com>
committer: GitHub <noreply at github.com>
date: 2017-10-26T00:28:02+03:00
summary:

bpo-30855: Fix winfo_id related Tkinter test on Windows. (#4121)

files:
M Lib/lib-tk/test/test_tkinter/test_widgets.py

diff --git a/Lib/lib-tk/test/test_tkinter/test_widgets.py b/Lib/lib-tk/test/test_tkinter/test_widgets.py
index 1c4c4f3f6e3..1f60204d4a0 100644
--- a/Lib/lib-tk/test/test_tkinter/test_widgets.py
+++ b/Lib/lib-tk/test/test_tkinter/test_widgets.py
@@ -88,7 +88,8 @@ def test_use(self):
         widget = self.create()
         self.assertEqual(widget['use'], '')
         parent = self.create(container=True)
-        wid = hex(parent.winfo_id())
+        # hex() adds the 'L' suffix for longs
+        wid = '%#x' % parent.winfo_id()
         widget2 = self.create(use=wid)
         self.assertEqual(widget2['use'], wid)
 



More information about the Python-checkins mailing list