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

Method test_paste_spin

Lib/idlelib/idle_test/test_editmenu.py:60–70  ·  view source on GitHub ↗

Test pasting into a spinbox with and without a selection.

(self)

Source from the content-addressed store, hash-verified

58 self.assertEqual(entry.get(), ans)
59
60 def test_paste_spin(self):
61 "Test pasting into a spinbox with and without a selection."
62 # See note above for entry.
63 spin = self.spin
64 for end, ans in (0, 'onetwo'), ('end', 'two'):
65 with self.subTest(end=end, ans=ans):
66 spin.delete(0, 'end')
67 spin.insert(0, 'one')
68 spin.selection('range', 0, end) # see note
69 spin.event_generate('<<Paste>>')
70 self.assertEqual(spin.get(), ans)
71
72
73if __name__ == '__main__':

Callers

nothing calls this directly

Calls 7

event_generateMethod · 0.80
subTestMethod · 0.45
deleteMethod · 0.45
insertMethod · 0.45
selectionMethod · 0.45
assertEqualMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected