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

Method test_substring_attribute_complete

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

Source from the content-addressed store, hash-verified

444 self.assertEqual(self.repl.matches_iter.matches, ["Foo.bar"])
445
446 def test_substring_attribute_complete(self):
447 self.repl = FakeRepl(
448 {"autocomplete_mode": autocomplete.AutocompleteModes.SUBSTRING}
449 )
450 self.set_input_line("Foo.az")
451
452 code = "class Foo():\n\tdef baz(self):\n\t\tpass\n"
453 for line in code.split("\n"):
454 self.repl.push(line)
455
456 self.assertTrue(self.repl.complete())
457 self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
458 self.assertEqual(self.repl.matches_iter.matches, ["Foo.baz"])
459
460 def test_fuzzy_attribute_complete(self):
461 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