'Test pasting into an entry with and without a selection.'

def test_paste_entry(self):

    for entry in (self.entry, self.tentry):
        for (end, ans) in ((0, 'onetwo'), ('end', 'two')):
            with self.subTest(entry=entry, end=end, ans=ans):
                entry.delete(0, 'end')
                entry.insert(0, 'one')
                entry.select_range(0, end)
                entry.event_generate('<<Paste>>')
                self.assertEqual(entry.get(), ans)
