• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"Test mainmenu, coverage 100%."
2# Reported as 88%; mocking turtledemo absence would have no point.
3
4from idlelib import mainmenu
5import unittest
6
7
8class MainMenuTest(unittest.TestCase):
9
10    def test_menudefs(self):
11        actual = [item[0] for item in mainmenu.menudefs]
12        expect = ['file', 'edit', 'format', 'run', 'shell',
13                  'debug', 'options', 'window', 'help']
14        self.assertEqual(actual, expect)
15
16    def test_default_keydefs(self):
17        self.assertGreaterEqual(len(mainmenu.default_keydefs), 50)
18
19
20if __name__ == '__main__':
21    unittest.main(verbosity=2)
22