Skip to content

test_curses has duplicated tests #106194

Closed
Closed

Description

@sobolevn

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

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    testsTests in the Lib/test dir
    on Jun 28, 2023
  2. self-assigned this
    on Jun 28, 2023
  3. added a commit that references this issue on Jun 28, 2023
  4. added a commit that references this issue on Jun 28, 2023
  5. added a commit that references this issue on Jun 28, 2023
  6. added a commit that references this issue on Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions