MCPcopy Create free account
hub / github.com/bpython/bpython / test_func_name_method_issue_479

Method test_func_name_method_issue_479

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

Source from the content-addressed store, hash-verified

188 self.assertEqual(self.repl.current_func.__name__, expected_name)
189
190 def test_func_name_method_issue_479(self):
191 for line, expected_name in [
192 ("o.spam(", "spam"),
193 # map pydoc has no signature in pypy
194 ("o.spam(any([]", "any") if pypy else ("o.spam(map([]", "map"),
195 ("o.spam((), ", "spam"),
196 ]:
197 self.set_input_line(line)
198 self.assertTrue(self.repl.get_args())
199 self.assertEqual(self.repl.current_func.__name__, expected_name)
200
201 def test_syntax_error_parens(self):
202 for line in ["spam(]", "spam([)", "spam())"]:

Callers

nothing calls this directly

Calls 2

set_input_lineMethod · 0.95
get_argsMethod · 0.80

Tested by

no test coverage detected