def METHOD_NAME(qtbot, editor_close_brackets):
    """Test insert surronding brackets to selected text."""
    editor = editor_close_brackets
    editor.set_text("some text")
    # select some
    cursor = editor.textCursor()
    cursor.movePosition(QTextCursor.Right, QTextCursor.KeepAnchor, 4)
    editor.setTextCursor(cursor)
    qtbot.keyClicks(editor, "(")
    assert editor.toPlainText() == "(some) text"
    qtbot.keyClicks(editor, "}")
    assert editor.toPlainText() == "({some}) text"
    qtbot.keyClicks(editor, "[")
    assert editor.toPlainText() == "({[some]}) text"