(self)
| 593 | self.assertRaises(TypeError, widget.bbox, 0, 1) |
| 594 | |
| 595 | def test_selection_methods(self): |
| 596 | widget = self.create() |
| 597 | widget.insert(0, '12345') |
| 598 | self.assertFalse(widget.selection_present()) |
| 599 | widget.selection_range(0, 'end') |
| 600 | self.assertEqual(widget.selection_get(), '12345') |
| 601 | self.assertTrue(widget.selection_present()) |
| 602 | widget.selection_from(1) |
| 603 | widget.selection_to(2) |
| 604 | self.assertEqual(widget.selection_get(), '2') |
| 605 | widget.selection_range(3, 4) |
| 606 | self.assertEqual(widget.selection_get(), '4') |
| 607 | widget.selection_clear() |
| 608 | self.assertFalse(widget.selection_present()) |
| 609 | widget.selection_range(0, 'end') |
| 610 | widget.selection_adjust(4) |
| 611 | self.assertEqual(widget.selection_get(), '1234') |
| 612 | widget.selection_adjust(1) |
| 613 | self.assertEqual(widget.selection_get(), '234') |
| 614 | widget.selection_adjust(5) |
| 615 | self.assertEqual(widget.selection_get(), '2345') |
| 616 | widget.selection_adjust(0) |
| 617 | self.assertEqual(widget.selection_get(), '12345') |
| 618 | |
| 619 | def test_selection_element(self): |
| 620 | widget = self.create() |
nothing calls this directly
no test coverage detected