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

Method test_fuzzy_attribute_complete

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

Source from the content-addressed store, hash-verified

458 self.assertEqual(self.repl.matches_iter.matches, ["Foo.baz"])
459
460 def test_fuzzy_attribute_complete(self):
461 self.repl = FakeRepl(
462 {"autocomplete_mode": autocomplete.AutocompleteModes.FUZZY}
463 )
464 self.set_input_line("Foo.br")
465
466 code = "class Foo():\n\tdef bar(self):\n\t\tpass\n"
467 for line in code.split("\n"):
468 self.repl.push(line)
469
470 self.assertTrue(self.repl.complete())
471 self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
472 self.assertEqual(self.repl.matches_iter.matches, ["Foo.bar"])
473
474 # 3. Edge cases
475 def test_updating_namespace_complete(self):

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