| 75 | equal(previous(), '') |
| 76 | |
| 77 | def test_before_only(self): |
| 78 | previous = self.auto_expand.getprevword |
| 79 | expand = self.auto_expand.expand_word_event |
| 80 | equal = self.assertEqual |
| 81 | |
| 82 | self.text.insert('insert', 'ab ac bx ad ab a') |
| 83 | equal(self.auto_expand.getwords(), ['ab', 'ad', 'ac', 'a']) |
| 84 | expand('event') |
| 85 | equal(previous(), 'ab') |
| 86 | expand('event') |
| 87 | equal(previous(), 'ad') |
| 88 | expand('event') |
| 89 | equal(previous(), 'ac') |
| 90 | expand('event') |
| 91 | equal(previous(), 'a') |
| 92 | |
| 93 | def test_after_only(self): |
| 94 | # Also add punctuation 'noise' that should be ignored. |