(self)
| 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( |
nothing calls this directly
no test coverage detected