(self)
| 452 | self.checkCommandParam(widget, 'vcmd') |
| 453 | |
| 454 | def test_selection_methods(self): |
| 455 | widget = self.create() |
| 456 | widget.insert(0, '12345') |
| 457 | self.assertFalse(widget.selection_present()) |
| 458 | widget.selection_range(0, 'end') |
| 459 | self.assertEqual(widget.selection_get(), '12345') |
| 460 | self.assertTrue(widget.selection_present()) |
| 461 | widget.selection_from(1) |
| 462 | widget.selection_to(2) |
| 463 | self.assertEqual(widget.selection_get(), '2') |
| 464 | widget.selection_range(3, 4) |
| 465 | self.assertEqual(widget.selection_get(), '4') |
| 466 | widget.selection_clear() |
| 467 | self.assertFalse(widget.selection_present()) |
| 468 | widget.selection_range(0, 'end') |
| 469 | widget.selection_adjust(4) |
| 470 | self.assertEqual(widget.selection_get(), '1234') |
| 471 | widget.selection_adjust(1) |
| 472 | self.assertEqual(widget.selection_get(), '234') |
| 473 | widget.selection_adjust(5) |
| 474 | self.assertEqual(widget.selection_get(), '2345') |
| 475 | widget.selection_adjust(0) |
| 476 | self.assertEqual(widget.selection_get(), '12345') |
| 477 | widget.selection_adjust(0) |
| 478 | |
| 479 | |
| 480 | @add_configure_tests(StandardOptionsTests) |
nothing calls this directly
no test coverage detected