MCPcopy Index your code
hub / github.com/python/cpython / test_mainloop

Method test_mainloop

Lib/test/test_tkinter/test_misc.py:463–473  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

461 self.assertRaises(TypeError, self.root.getboolean, ())
462
463 def test_mainloop(self):
464 log = []
465 def callback():
466 log.append(1)
467 self.root.after(100, self.root.quit)
468 self.root.after(100, callback)
469 self.root.mainloop(1)
470 self.assertEqual(log, [])
471 self.root.mainloop(0)
472 self.assertEqual(log, [1])
473 self.assertTrue(self.root.winfo_exists())
474
475 def test_info_patchlevel(self):
476 vi = self.root.info_patchlevel()

Callers

nothing calls this directly

Calls 5

afterMethod · 0.80
assertTrueMethod · 0.80
winfo_existsMethod · 0.80
mainloopMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected