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

Method test_paremeter_name_completion

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

Source from the content-addressed store, hash-verified

494
495 # 4. Parameter names
496 def test_paremeter_name_completion(self):
497 self.repl = FakeRepl(
498 {"autocomplete_mode": autocomplete.AutocompleteModes.SIMPLE}
499 )
500 self.set_input_line("foo(ab")
501
502 code = "def foo(abc=1, abd=2, xyz=3):\n\tpass\n"
503 for line in code.split("\n"):
504 self.repl.push(line)
505
506 self.assertTrue(self.repl.complete())
507 self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
508 self.assertEqual(
509 self.repl.matches_iter.matches, ["abc=", "abd=", "abs("]
510 )
511
512 def test_parameter_advanced_on_class(self):
513 self.repl = FakeRepl(

Callers

nothing calls this directly

Calls 4

set_input_lineMethod · 0.95
FakeReplClass · 0.85
pushMethod · 0.45
completeMethod · 0.45

Tested by

no test coverage detected