Skip to content

gh-106194: Rename duplicated tests in test_curses #106196

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

Merged
merged 3 commits into from
Jun 28, 2023

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Jun 28, 2023

Based on tests near the problematic ones, we can see test_move_up and test_move_down.
Source:

def test_move_up(self):
"""Test moving the cursor left."""
self.mock_win.reset_mock()
self.textbox.do_command(curses.KEY_UP)
self.mock_win.move.assert_called_with(0, 1)
self.mock_win.reset_mock()
def test_move_down(self):
"""Test moving the cursor left."""
self.mock_win.reset_mock()
self.textbox.do_command(curses.KEY_DOWN)
self.mock_win.move.assert_called_with(2, 1)
self.mock_win.reset_mock()

So, I think it is safe to just replace them with test_move_left and test_move_right.

Copy link
Member

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Thanks!

@hugovk hugovk added needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Jun 28, 2023
@hugovk hugovk merged commit 3fb7c60 into python:main Jun 28, 2023
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @sobolevn and @hugovk, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 3fb7c608e5764559a718ce8cb81350d7a3df0356 3.11

@bedevere-bot
Copy link

GH-106216 is a backport of this pull request to the 3.12 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.12 only security fixes label Jun 28, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 28, 2023
hugovk pushed a commit that referenced this pull request Jun 28, 2023
@hugovk
Copy link
Member

hugovk commented Jun 29, 2023

These tests were added in this bug fix: #103783, which didn't get backported to 3.11 for some reason.

I'll ask over there if it should be back backported, and if so, this test fix should be included.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants