diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-11-05 10:00:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-05 10:00:18 (GMT) |
commit | 099a94fba3f9437e29d16ed54215ec8cf65de868 (patch) | |
tree | 5f60e4c3cf72a26a730c2d393a6fa4d80dd11033 /Lib | |
parent | 363ecb36da273ddb0c80ad14f3f1aa5101223bc2 (diff) | |
download | cpython-099a94fba3f9437e29d16ed54215ec8cf65de868.zip cpython-099a94fba3f9437e29d16ed54215ec8cf65de868.tar.gz cpython-099a94fba3f9437e29d16ed54215ec8cf65de868.tar.bz2 |
bpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416) (GH-29421)
(cherry picked from commit 54d1e3f72ed1ad8e860888c30ee7a285b931c0d1)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/tkinter/test/test_ttk/test_extensions.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/tkinter/test/test_ttk/test_extensions.py b/Lib/tkinter/test/test_ttk/test_extensions.py index cddd1f2..7fc1ebb 100644 --- a/Lib/tkinter/test/test_ttk/test_extensions.py +++ b/Lib/tkinter/test/test_ttk/test_extensions.py @@ -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): |