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

Method test_cur_line

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

Source from the content-addressed store, hash-verified

129 self.assertEqual(list(newslice), newmatches)
130
131 def test_cur_line(self):
132 completer = mock.Mock()
133 completer.locate.return_value = LinePart(
134 0,
135 self.matches_iterator.orig_cursor_offset,
136 self.matches_iterator.orig_line,
137 )
138 self.matches_iterator.completer = completer
139
140 with self.assertRaises(ValueError):
141 self.matches_iterator.cur_line()
142
143 self.assertEqual(next(self.matches_iterator), self.matches[0])
144 self.assertEqual(
145 self.matches_iterator.cur_line(),
146 (len(self.matches[0]), self.matches[0]),
147 )
148
149 def test_is_cseq(self):
150 self.assertTrue(self.matches_iterator.is_cseq())

Callers

nothing calls this directly

Calls 2

LinePartClass · 0.90
cur_lineMethod · 0.80

Tested by

no test coverage detected