mirror of
https://github.com/python/cpython
synced 2024-09-16 02:59:56 +00:00
bpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416)
This commit is contained in:
parent
3167df1621
commit
54d1e3f72e
|
@ -310,9 +310,12 @@ def cb_test(*args):
|
|||
self.assertEqual(textvar.get(), items[1])
|
||||
success.append(True)
|
||||
optmenu = ttk.OptionMenu(self.root, textvar, "a", *items)
|
||||
textvar.trace("w", cb_test)
|
||||
optmenu.pack()
|
||||
cb_name = textvar.trace("w", cb_test)
|
||||
optmenu['menu'].invoke(1)
|
||||
self.assertEqual(success, [True])
|
||||
textvar.trace_vdelete("w", cb_name)
|
||||
optmenu.destroy()
|
||||
|
||||
|
||||
class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase):
|
||||
|
|
Loading…
Reference in a new issue