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

Method test_identify

Lib/test/test_ttk/test_widgets.py:80–90  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

78 self.widget.pack()
79
80 def test_identify(self):
81 self.widget.update()
82 self.assertEqual(self.widget.identify(
83 int(self.widget.winfo_width() / 2),
84 int(self.widget.winfo_height() / 2)
85 ), "label")
86 self.assertEqual(self.widget.identify(-1, -1), "")
87
88 self.assertRaises(tkinter.TclError, self.widget.identify, None, 5)
89 self.assertRaises(tkinter.TclError, self.widget.identify, 5, None)
90 self.assertRaises(tkinter.TclError, self.widget.identify, 5, '')
91
92 def test_widget_state(self):
93 # XXX not sure about the portability of all these tests

Callers

nothing calls this directly

Calls 6

winfo_widthMethod · 0.80
winfo_heightMethod · 0.80
updateMethod · 0.45
assertEqualMethod · 0.45
identifyMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected