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

test_curses has duplicated tests #106194

Closed
sobolevn opened this issue Jun 28, 2023 · 0 comments
Closed

test_curses has duplicated tests #106194

sobolevn opened this issue Jun 28, 2023 · 0 comments
Assignees
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Jun 28, 2023

From python/core-workflow#505

Lib/test/test_curses.py:1371:5: F811 redefinition of unused 'test_move_left' from line 1362

Source:

def test_move_left(self):
"""Test moving the cursor left."""
self.mock_win.reset_mock()
self.textbox.do_command(curses.KEY_LEFT)
self.mock_win.move.assert_called_with(1, 0)
self.textbox.do_command(curses.KEY_RIGHT)
self.mock_win.move.assert_called_with(1, 2)
self.mock_win.reset_mock()
def test_move_left(self):
"""Test moving the cursor left."""
self.mock_win.reset_mock()
self.textbox.do_command(curses.KEY_RIGHT)
self.mock_win.move.assert_called_with(1, 2)
self.mock_win.reset_mock()

Based on a context, I think they should be renamed to test_move_left and test_move_right.

Linked PRs

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir labels Jun 28, 2023
@sobolevn sobolevn self-assigned this Jun 28, 2023
sobolevn added a commit to sobolevn/cpython that referenced this issue Jun 28, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jun 28, 2023
…06196)

(cherry picked from commit 3fb7c60)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
hugovk pushed a commit that referenced this issue Jun 28, 2023
#106216)

Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants