• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"Test calltip_w, coverage 18%."
2
3from idlelib import calltip_w
4import unittest
5from test.support import requires
6from tkinter import Tk, Text
7
8
9class CallTipWindowTest(unittest.TestCase):
10
11    @classmethod
12    def setUpClass(cls):
13        requires('gui')
14        cls.root = Tk()
15        cls.root.withdraw()
16        cls.text = Text(cls.root)
17        cls.calltip = calltip_w.CalltipWindow(cls.text)
18
19    @classmethod
20    def tearDownClass(cls):
21        cls.root.update_idletasks()
22        cls.root.destroy()
23        del cls.text, cls.root
24
25    def test_init(self):
26        self.assertEqual(self.calltip.anchor_widget, self.text)
27
28if __name__ == '__main__':
29    unittest.main(verbosity=2)
30