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

Method test_simple_attribute_complete

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

Source from the content-addressed store, hash-verified

430
431 # 2. Attribute tests
432 def test_simple_attribute_complete(self):
433 self.repl = FakeRepl(
434 {"autocomplete_mode": autocomplete.AutocompleteModes.SIMPLE}
435 )
436 self.set_input_line("Foo.b")
437
438 code = "class Foo():\n\tdef bar(self):\n\t\tpass\n"
439 for line in code.split("\n"):
440 self.repl.push(line)
441
442 self.assertTrue(self.repl.complete())
443 self.assertTrue(hasattr(self.repl.matches_iter, "matches"))
444 self.assertEqual(self.repl.matches_iter.matches, ["Foo.bar"])
445
446 def test_substring_attribute_complete(self):
447 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