Coverage for idle_test/test_filelist.py: 52%
25 statements
« prev ^ index » next coverage.py v7.2.5, created at 2023-05-11 13:22 -0700
« prev ^ index » next coverage.py v7.2.5, created at 2023-05-11 13:22 -0700
1"Test filelist, coverage 19%."
3from idlelib import filelist
4import unittest
5from test.support import requires
6from tkinter import Tk
8class FileListTest(unittest.TestCase):
10 @classmethod
11 def setUpClass(cls):
12 requires('gui')
13 cls.root = Tk()
14 cls.root.withdraw()
16 @classmethod
17 def tearDownClass(cls):
18 cls.root.update_idletasks()
19 for id in cls.root.tk.call('after', 'info'):
20 cls.root.after_cancel(id)
21 cls.root.destroy()
22 del cls.root
24 def test_new_empty(self):
25 flist = filelist.FileList(self.root)
26 self.assertEqual(flist.root, self.root)
27 e = flist.new()
28 self.assertEqual(type(e), flist.EditorWindow)
29 e._close()
32if __name__ == '__main__': 32 ↛ 33line 32 didn't jump to line 33, because the condition on line 32 was never true
33 unittest.main(verbosity=2)