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

Method test_before_only

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

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 3

expandFunction · 0.85
getwordsMethod · 0.80
insertMethod · 0.45

Tested by

no test coverage detected