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

Method test_identify

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

Source from the content-addressed store, hash-verified

380 self.assertRaises(tkinter.TclError, self.entry.bbox, None)
381
382 def test_identify(self):
383 if (tk_version >= (9, 0) and sys.platform == 'darwin'
384 and isinstance(self.entry, ttk.Combobox)):
385 self.skipTest('Test does not work on macOS Tk 9.')
386 # https://core.tcl-lang.org/tk/tktview/8b49e9cfa6
387 self.entry.pack()
388 self.root.update()
389
390 self.assertIn(self.entry.identify(5, 5), self.IDENTIFY_AS)
391 self.assertEqual(self.entry.identify(-1, -1), "")
392
393 self.assertRaises(tkinter.TclError, self.entry.identify, None, 5)
394 self.assertRaises(tkinter.TclError, self.entry.identify, 5, None)
395 self.assertRaises(tkinter.TclError, self.entry.identify, 5, '')
396
397 def test_validation_options(self):
398 success = []

Callers

nothing calls this directly

Calls 7

skipTestMethod · 0.80
assertInMethod · 0.80
packMethod · 0.45
updateMethod · 0.45
identifyMethod · 0.45
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected