summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-06-28 21:12:12 (GMT)
committerGitHub <noreply@github.com>2023-06-28 21:12:12 (GMT)
commite12045d64853ddfd5f4dbf193270b644de3b8d9a (patch)
treedc596638c96adc00c231de443bfaa2f2b0d77b08
parented2114f1cf927206d08b3bc824b2fc3d515f5eae (diff)
downloadcpython-e12045d64853ddfd5f4dbf193270b644de3b8d9a.zip
cpython-e12045d64853ddfd5f4dbf193270b644de3b8d9a.tar.gz
cpython-e12045d64853ddfd5f4dbf193270b644de3b8d9a.tar.bz2
[3.12] gh-106194: Rename duplicated tests in `test_curses` (GH-106196) (#106216)
Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
-rw-r--r--Lib/test/test_curses.py15
1 files changed, 11 insertions, 4 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index 3ab837e..31bc108 100644
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -1364,26 +1364,33 @@ class TextboxTest(unittest.TestCase):
self.mock_win.reset_mock()
self.textbox.do_command(curses.KEY_LEFT)
self.mock_win.move.assert_called_with(1, 0)
+ self.mock_win.reset_mock()
+
+ def test_move_right(self):
+ """Test moving the cursor right."""
+ 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()
- def test_move_left(self):
- """Test moving the cursor left."""
+ def test_move_left_and_right(self):
+ """Test moving the cursor left and then right."""
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_up(self):
- """Test moving the cursor left."""
+ """Test moving the cursor up."""
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."""
+ """Test moving the cursor down."""
self.mock_win.reset_mock()
self.textbox.do_command(curses.KEY_DOWN)
self.mock_win.move.assert_called_with(2, 1)