MCPcopy Index your code
hub / github.com/python/cpython / fetch_test

Method fetch_test

Lib/idlelib/idle_test/test_history.py:90–104  ·  view source on GitHub ↗
(self, reverse, line, prefix, index, *, bell=False)

Source from the content-addressed store, hash-verified

88 del cls.root
89
90 def fetch_test(self, reverse, line, prefix, index, *, bell=False):
91 # Perform one fetch as invoked by Alt-N or Alt-P
92 # Test the result. The line test is the most important.
93 # The last two are diagnostic of fetch internals.
94 History = self.history
95 History.fetch(reverse)
96
97 Equal = self.assertEqual
98 Equal(self.text.get('iomark', 'end-1c'), line)
99 Equal(self.text._bell, bell)
100 if bell:
101 self.text._bell = False
102 Equal(History.prefix, prefix)
103 Equal(History.pointer, index)
104 Equal(self.text.compare("insert", '==', "end-1c"), 1)
105
106 def test_fetch_prev_cyclic(self):
107 prefix = ''

Callers 4

test_fetch_editMethod · 0.95

Calls 3

fetchMethod · 0.45
getMethod · 0.45
compareMethod · 0.45

Tested by

no test coverage detected