]> granicus.if.org Git - python/commitdiff
bpo-30855: Fix winfo_id related Tkinter test on Windows. (#4121)
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 25 Oct 2017 21:28:02 +0000 (00:28 +0300)
committerGitHub <noreply@github.com>
Wed, 25 Oct 2017 21:28:02 +0000 (00:28 +0300)
Lib/lib-tk/test/test_tkinter/test_widgets.py

index 1c4c4f3f6e33de2c62dfec4cbdac45ed84f23488..1f60204d4a0a85938e847054f9e221a050c56a14 100644 (file)
@@ -88,7 +88,8 @@ class ToplevelTest(AbstractToplevelTest, unittest.TestCase):
         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)