Test pasting into a spinbox with and without a selection.
(self)
| 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 | |
| 73 | if __name__ == '__main__': |
nothing calls this directly
no test coverage detected