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

Method test_click_selection

Lib/idlelib/idle_test/test_sidebar.py:261–272  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

259
260 @unittest.skip('test disabled')
261 def test_click_selection(self):
262 self.linenumber.show_sidebar()
263 self.text.insert('1.0', 'one\ntwo\nthree\nfour\n')
264 self.root.update()
265
266 # Click on the second line.
267 x, y = self.get_line_screen_position(2)
268 self.linenumber.sidebar_text.event_generate('<Button-1>', x=x, y=y)
269 self.linenumber.sidebar_text.update()
270 self.root.update()
271
272 self.assertEqual(self.get_selection(), ('2.0', '3.0'))
273
274 def simulate_drag(self, start_line, end_line):
275 start_x, start_y = self.get_line_screen_position(start_line)

Callers

nothing calls this directly

Calls 7

get_selectionMethod · 0.95
show_sidebarMethod · 0.80
event_generateMethod · 0.80
insertMethod · 0.45
updateMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected