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

Method test_seq

bpython/test/test_manual_readline.py:275–288  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

273 self.edits = UnconfiguredEdits()
274
275 def test_seq(self):
276 def f(cursor_offset, line):
277 return ("hi", 2)
278
279 self.edits.add("a", f)
280 self.assertIn("a", self.edits)
281 self.assertEqual(self.edits["a"], f)
282 self.assertEqual(
283 self.edits.call("a", cursor_offset=3, line="hello"), ("hi", 2)
284 )
285 with self.assertRaises(KeyError):
286 self.edits["b"]
287 with self.assertRaises(KeyError):
288 self.edits.call("b")
289
290 def test_functions_with_bad_signatures(self):
291 def f(something):

Callers

nothing calls this directly

Calls 2

callMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected