Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR: Fix test_copy_paste_autoindent forcing text over the clipboard to work (Editor) #22618

Merged
merged 1 commit into from
Oct 1, 2024

Conversation

dalthviz
Copy link
Member

@dalthviz dalthviz commented Oct 1, 2024

Description of Changes

Checking PR #22480 I was able to confirm that the test spyder\plugins\editor\widgets\codeeditor\tests\test_autoindent.py::test_copy_paste_autoindent had an error and it was being able to pass by forcing some text to be over the clipboard. The need to use the clipboard directly was due to an incorrect position definition (59 instead of 51) to select text. Also, this position definition was causing a warning (QtWarningMsg: QTextCursor::setPosition: Position '59' out of range) since the text used over the test doesn't have such position. This warning can be seen in the PR #22480 failed test Captured Qt messages section: https://github.com/spyder-ide/spyder/actions/runs/10797623921/job/30226163168?pr=22480#step:14:6338

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: dalthviz

@dalthviz dalthviz added this to the v6.0.2 milestone Oct 1, 2024
@dalthviz dalthviz self-assigned this Oct 1, 2024
@dalthviz dalthviz changed the title PR: Fix 'test_copy_paste_autoindent' forcing text over the clipboard to work (Editor) PR: Fix test_copy_paste_autoindent forcing text over the clipboard to work (Editor) Oct 1, 2024
@dalthviz dalthviz requested a review from ccordoba12 October 1, 2024 02:29
@dalthviz dalthviz marked this pull request as ready for review October 1, 2024 02:30
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks @dalthviz!

@ccordoba12 ccordoba12 merged commit 677ba4a into spyder-ide:master Oct 1, 2024
14 checks passed
@ccordoba12
Copy link
Member

@meeseeksdev please backport to 6.x

meeseeksmachine pushed a commit to meeseeksmachine/spyder that referenced this pull request Oct 1, 2024
…rcing text over the clipboard to work (Editor)
ccordoba12 added a commit that referenced this pull request Oct 1, 2024
…` forcing text over the clipboard to work (Editor)) (#22619)

Co-authored-by: Carlos Cordoba <ccordoba12@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants