Esempio n. 1
0
 def test_apostrophe_not_current(self):
   mock_event = MagicMock()
   mock_event.cli.current_buffer.document.current_char = "n"
   apostrophe(mock_event)
   mock_event.cli.current_buffer.insert_text.assert_has_calls([call("'"), call("'", move_cursor=False)])
Esempio n. 2
0
def test_apostrophe_not_current(binder):
    binder.cli.current_buffer.document.current_char = "n"
    apostrophe(binder)
    binder.cli.current_buffer.insert_text.assert_has_calls([call("'"), call("'", move_cursor=False)])
Esempio n. 3
0
 def test_apostrophe_current(self):
   mock_event = MagicMock()
   mock_event.cli.current_buffer.document.current_char = "'"
   apostrophe(mock_event)
   mock_event.cli.current_buffer.cursor_right.assert_called_once_with()
Esempio n. 4
0
def test_apostrophe_current(binder):
    binder.cli.current_buffer.document.current_char = "'"
    apostrophe(binder)
    binder.cli.current_buffer.cursor_right.assert_called_once_with()