diff -r 76713f4d9f0f Lib/idlelib/idle_test/test_formatparagraph.py --- a/Lib/idlelib/idle_test/test_formatparagraph.py Sun Feb 09 06:07:47 2014 -0800 +++ b/Lib/idlelib/idle_test/test_formatparagraph.py Sun Feb 09 19:11:11 2014 +0200 @@ -277,6 +277,9 @@ @classmethod def tearDownClass(cls): cls.root.destroy() + del cls.root + del cls.text + del cls.formatter def test_short_line(self): self.text.insert('1.0', "Short line\n") diff -r 76713f4d9f0f Lib/idlelib/idle_test/test_idlehistory.py --- a/Lib/idlelib/idle_test/test_idlehistory.py Sun Feb 09 06:07:47 2014 -0800 +++ b/Lib/idlelib/idle_test/test_idlehistory.py Sun Feb 09 19:11:11 2014 +0200 @@ -80,6 +80,7 @@ @classmethod def tearDownClass(cls): cls.root.destroy() + del cls.root def fetch_test(self, reverse, line, prefix, index, *, bell=False): # Perform one fetch as invoked by Alt-N or Alt-P diff -r 76713f4d9f0f Lib/idlelib/idle_test/test_searchengine.py --- a/Lib/idlelib/idle_test/test_searchengine.py Sun Feb 09 06:07:47 2014 -0800 +++ b/Lib/idlelib/idle_test/test_searchengine.py Sun Feb 09 19:11:11 2014 +0200 @@ -64,6 +64,7 @@ ## @classmethod ## def tearDownClass(cls): ## cls.root.destroy() +## del cls.root def test_get_selection(self): # text = Text(master=self.root) @@ -219,6 +220,7 @@ ## @classmethod ## def tearDownClass(cls): ## cls.root.destroy() +## del cls.root def test_search(self): Equal = self.assertEqual @@ -261,6 +263,7 @@ ## @classmethod ## def tearDownClass(cls): ## cls.root.destroy() +## del cls.root @classmethod def setUpClass(cls): diff -r 76713f4d9f0f Lib/idlelib/idle_test/test_text.py --- a/Lib/idlelib/idle_test/test_text.py Sun Feb 09 06:07:47 2014 -0800 +++ b/Lib/idlelib/idle_test/test_text.py Sun Feb 09 19:11:11 2014 +0200 @@ -221,6 +221,7 @@ @classmethod def tearDownClass(cls): cls.root.destroy() + del cls.root if __name__ == '__main__': diff -r 76713f4d9f0f Lib/test/test_idle.py --- a/Lib/test/test_idle.py Sun Feb 09 06:07:47 2014 -0800 +++ b/Lib/test/test_idle.py Sun Feb 09 19:11:11 2014 +0200 @@ -14,6 +14,7 @@ try: root = tk.Tk() root.destroy() + del root except tk.TclError: while 'gui' in use_resources: use_resources.remove('gui')