MCPcopy Create free account
hub / github.com/python/cpython / test_after_only

Method test_after_only

Lib/idlelib/idle_test/test_autoexpand.py:93–110  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

91 equal(previous(), 'a')
92
93 def test_after_only(self):
94 # Also add punctuation 'noise' that should be ignored.
95 text = self.text
96 previous = self.auto_expand.getprevword
97 expand = self.auto_expand.expand_word_event
98 equal = self.assertEqual
99
100 text.insert('insert', 'a, [ab] ac: () bx"" cd ac= ad ya')
101 text.mark_set('insert', '1.1')
102 equal(self.auto_expand.getwords(), ['ab', 'ac', 'ad', 'a'])
103 expand('event')
104 equal(previous(), 'ab')
105 expand('event')
106 equal(previous(), 'ac')
107 expand('event')
108 equal(previous(), 'ad')
109 expand('event')
110 equal(previous(), 'a')
111
112 def test_both_before_after(self):
113 text = self.text

Callers

nothing calls this directly

Calls 4

expandFunction · 0.85
getwordsMethod · 0.80
insertMethod · 0.45
mark_setMethod · 0.45

Tested by

no test coverage detected