diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-11-05 03:00:05 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-05 11:00:05 +0100 |
| commit | 276a3a6a16ebf489607db31ad86c58dd89567306 (patch) | |
| tree | 85fcfaf692b5f43c568c770e683653e1bb48a3cd | |
| parent | 885e57c148d0b2c34daa2b7e5162dc57cf7e4469 (diff) | |
| download | cpython-git-276a3a6a16ebf489607db31ad86c58dd89567306.tar.gz | |
bpo-45160: Fix refleak in test_ttk_guionly introduced in GH-28291 (GH-29416) (GH-29420)
(cherry picked from commit 54d1e3f72ed1ad8e860888c30ee7a285b931c0d1)
Co-authored-by: Ćukasz Langa <lukasz@langa.pl>
| -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 cddd1f2e84..7fc1ebb95c 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): |
