Skip to content

Commit e12045d

Browse files
[3.12] gh-106194: Rename duplicated tests in test_curses (GH-106196) (#106216)
Co-authored-by: Nikita Sobolev <[email protected]>
1 parent ed2114f commit e12045d

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Lib/test/test_curses.py

+11-4
Original file line numberDiff line numberDiff line change
@@ -1364,26 +1364,33 @@ def test_move_left(self):
13641364
self.mock_win.reset_mock()
13651365
self.textbox.do_command(curses.KEY_LEFT)
13661366
self.mock_win.move.assert_called_with(1, 0)
1367+
self.mock_win.reset_mock()
1368+
1369+
def test_move_right(self):
1370+
"""Test moving the cursor right."""
1371+
self.mock_win.reset_mock()
13671372
self.textbox.do_command(curses.KEY_RIGHT)
13681373
self.mock_win.move.assert_called_with(1, 2)
13691374
self.mock_win.reset_mock()
13701375

1371-
def test_move_left(self):
1372-
"""Test moving the cursor left."""
1376+
def test_move_left_and_right(self):
1377+
"""Test moving the cursor left and then right."""
13731378
self.mock_win.reset_mock()
1379+
self.textbox.do_command(curses.KEY_LEFT)
1380+
self.mock_win.move.assert_called_with(1, 0)
13741381
self.textbox.do_command(curses.KEY_RIGHT)
13751382
self.mock_win.move.assert_called_with(1, 2)
13761383
self.mock_win.reset_mock()
13771384

13781385
def test_move_up(self):
1379-
"""Test moving the cursor left."""
1386+
"""Test moving the cursor up."""
13801387
self.mock_win.reset_mock()
13811388
self.textbox.do_command(curses.KEY_UP)
13821389
self.mock_win.move.assert_called_with(0, 1)
13831390
self.mock_win.reset_mock()
13841391

13851392
def test_move_down(self):
1386-
"""Test moving the cursor left."""
1393+
"""Test moving the cursor down."""
13871394
self.mock_win.reset_mock()
13881395
self.textbox.do_command(curses.KEY_DOWN)
13891396
self.mock_win.move.assert_called_with(2, 1)

0 commit comments

Comments
 (0)