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

Method test_curselection

Lib/test/test_tkinter/test_widgets.py:1155–1162  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1153 self.assertRaises(TypeError, lb.bbox, 0, 1)
1154
1155 def test_curselection(self):
1156 lb = self.create()
1157 lb.insert(0, *('el%d' % i for i in range(8)))
1158 lb.selection_clear(0, tkinter.END)
1159 lb.selection_set(2, 4)
1160 lb.selection_set(6)
1161 self.assertEqual(lb.curselection(), (2, 3, 4, 6))
1162 self.assertRaises(TypeError, lb.curselection, 0)
1163
1164 def test_get(self):
1165 lb = self.create()

Callers

nothing calls this directly

Calls 7

createMethod · 0.95
curselectionMethod · 0.80
insertMethod · 0.45
selection_clearMethod · 0.45
selection_setMethod · 0.45
assertEqualMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected