MCPcopy Index your code
hub / github.com/bpython/bpython / test_update

Method test_update

bpython/test/test_repl.py:118–129  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

116 self.assertEqual(self.matches_iterator.current(), self.matches[0])
117
118 def test_update(self):
119 slice = islice(self.matches_iterator, 0, 3)
120 self.assertEqual(list(slice), self.matches)
121
122 newmatches = ["string", "str", "set"]
123 completer = mock.Mock()
124 completer.locate.return_value = LinePart(0, 1, "s")
125 self.matches_iterator.update(1, "s", newmatches, completer)
126
127 newslice = islice(newmatches, 0, 3)
128 self.assertNotEqual(list(slice), self.matches)
129 self.assertEqual(list(newslice), newmatches)
130
131 def test_cur_line(self):
132 completer = mock.Mock()

Callers

nothing calls this directly

Calls 2

LinePartClass · 0.90
updateMethod · 0.80

Tested by

no test coverage detected