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

Method test_get_last_word

bpython/test/test_curtsies_repl.py:77–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

75 self.repl.send_session_to_external_editor()
76
77 def test_get_last_word(self):
78 self.repl.rl_history.entries = ["1", "2 3", "4 5 6"]
79 self.repl._set_current_line("abcde")
80 self.repl.get_last_word()
81 self.assertEqual(self.repl.current_line, "abcde6")
82 self.repl.get_last_word()
83 self.assertEqual(self.repl.current_line, "abcde3")
84
85 def test_last_word(self):
86 self.assertEqual(curtsiesrepl._last_word(""), "")

Callers

nothing calls this directly

Calls 2

get_last_wordMethod · 0.80
_set_current_lineMethod · 0.45

Tested by

no test coverage detected