bpo-43981: Fix reference leaks in test_squeezer (GH-25758)
https://github.com/python/cpython/commit/6689e45dfee75d756c540ff0946ebf0ae88... commit: 6689e45dfee75d756c540ff0946ebf0ae8847f43 branch: master author: Pablo Galindo <Pablogsal@gmail.com> committer: pablogsal <Pablogsal@gmail.com> date: 2021-04-30T19:34:29+01:00 summary: bpo-43981: Fix reference leaks in test_squeezer (GH-25758) files: A Misc/NEWS.d/next/IDLE/2021-04-30-17-59-56.bpo-43981.3EFl1H.rst M Lib/idlelib/idle_test/test_squeezer.py diff --git a/Lib/idlelib/idle_test/test_squeezer.py b/Lib/idlelib/idle_test/test_squeezer.py index eaf81a5fc1a053..86c5d41b629719 100644 --- a/Lib/idlelib/idle_test/test_squeezer.py +++ b/Lib/idlelib/idle_test/test_squeezer.py @@ -311,6 +311,7 @@ def make_mock_squeezer(self): squeezer = Mock() squeezer.editwin.text = Text(root) squeezer.editwin.per = Percolator(squeezer.editwin.text) + self.addCleanup(squeezer.editwin.per.close) # Set default values for the configuration settings. squeezer.auto_squeeze_min_lines = 50 diff --git a/Misc/NEWS.d/next/IDLE/2021-04-30-17-59-56.bpo-43981.3EFl1H.rst b/Misc/NEWS.d/next/IDLE/2021-04-30-17-59-56.bpo-43981.3EFl1H.rst new file mode 100644 index 00000000000000..10eb8b01d13a48 --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2021-04-30-17-59-56.bpo-43981.3EFl1H.rst @@ -0,0 +1 @@ +Fix reference leak in test_squeezer. Patch by Pablo Galindo \ No newline at end of file
participants (1)
-
pablogsal