From 09a1464fd8e1421362374cc1c15d5249e856e01c Mon Sep 17 00:00:00 2001 From: dalthviz <16781833+dalthviz@users.noreply.github.com> Date: Mon, 30 Sep 2024 20:52:39 -0500 Subject: [PATCH] Editor: Fix 'test_copy_paste_autoindent' forcing text over the clipboard to work --- .../editor/widgets/codeeditor/tests/test_autoindent.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spyder/plugins/editor/widgets/codeeditor/tests/test_autoindent.py b/spyder/plugins/editor/widgets/codeeditor/tests/test_autoindent.py index ea2f07e0465..c98f8d0edf7 100644 --- a/spyder/plugins/editor/widgets/codeeditor/tests/test_autoindent.py +++ b/spyder/plugins/editor/widgets/codeeditor/tests/test_autoindent.py @@ -469,10 +469,8 @@ def test_copy_paste_autoindent(codeeditor): # Copy cursor = editor.textCursor() cursor.setPosition(30) - cursor.setPosition(59, QTextCursor.KeepAnchor) + cursor.setPosition(51, QTextCursor.KeepAnchor) editor.setTextCursor(cursor) - cb = QApplication.clipboard() - cb.setText("d\n if e:\n f", mode=cb.Clipboard) editor.copy() d = { @@ -495,10 +493,8 @@ def test_copy_paste_autoindent(codeeditor): # Copy cursor = editor.textCursor() cursor.setPosition(30-4) - cursor.setPosition(59, QTextCursor.KeepAnchor) + cursor.setPosition(51, QTextCursor.KeepAnchor) editor.setTextCursor(cursor) - cb = QApplication.clipboard() - cb.setText(" d\n if e:\n f", mode=cb.Clipboard) editor.copy() d = {