(self)
| 434 | """ |
| 435 | |
| 436 | def test_get_region(self): |
| 437 | get = self.formatter.get_region |
| 438 | text = self.text |
| 439 | eq = self.assertEqual |
| 440 | |
| 441 | # Add selection. |
| 442 | text.tag_add('sel', '7.0', '10.0') |
| 443 | expected_lines = ['', |
| 444 | ' def compare(self):', |
| 445 | ' if a > b:', |
| 446 | ''] |
| 447 | eq(get(), ('7.0', '10.0', '\n'.join(expected_lines), expected_lines)) |
| 448 | |
| 449 | # Remove selection. |
| 450 | text.tag_remove('sel', '1.0', 'end') |
| 451 | eq(get(), ('15.0', '16.0', '\n', ['', ''])) |
| 452 | |
| 453 | def test_set_region(self): |
| 454 | set_ = self.formatter.set_region |
nothing calls this directly
no test coverage detected