Skip to content

test_curses has duplicated tests #106194

Closed
Closed
@sobolevn

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

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