'Test cursor position based on the prompt.'

def test_position(self, qtbot, cmd_edit):

    qtbot.keyClicks(cmd_edit, ':hello')
    assert (cmd_edit.text() == ':hello')
    assert (cmd_edit.cursorPosition() == len(':hello'))
    cmd_edit.home(mark=True)
    assert (cmd_edit.cursorPosition() == len(':hello'))
    qtbot.keyClick(cmd_edit, Qt.Key_Delete)
    assert (cmd_edit.text() == ':')
    qtbot.keyClick(cmd_edit, Qt.Key_Backspace)
    assert (cmd_edit.text() == ':')
    qtbot.keyClicks(cmd_edit, 'hey    again')
    assert (cmd_edit.text() == ':hey    again')
