mirror of
https://github.com/python/cpython.git
synced 2025-09-08 01:41:19 +00:00
bpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416) (GH-29421)
(cherry picked from commit 54d1e3f72e
)
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
This commit is contained in:
parent
363ecb36da
commit
099a94fba3
1 changed files with 4 additions and 1 deletions
|
@ -310,9 +310,12 @@ class OptionMenuTest(AbstractTkTest, unittest.TestCase):
|
|||
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…
Add table
Add a link
Reference in a new issue