Skip to content

Commit

Permalink
Simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Compiler committed Oct 30, 2018
1 parent e23b6ef commit d5a5e08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/unit/misc/test_miscwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ def test_selection_home(self, qtbot, cmd_edit):
assert cmd_edit.cursorPosition() == len(':')
assert cmd_edit.selectionStart() == len(':')

def test_selection_backspace(self, qtbot, cmd_edit):
"""Test selection persisting when backspacing to the first char."""
def test_selection_cursor_left(self, qtbot, cmd_edit):
"""Test selection persisting when moving to the first char."""
qtbot.keyClicks(cmd_edit, ':hello')
assert cmd_edit.text() == ':hello'
assert cmd_edit.cursorPosition() == len(':hello')
for _ in range(len(':hello')):
for _ in ':hello':
qtbot.keyClick(cmd_edit, Qt.Key_Left, modifier=Qt.ShiftModifier)
assert cmd_edit.cursorPosition() == len(':')
assert cmd_edit.selectionStart() == len(':')
Expand Down

0 comments on commit d5a5e08

Please sign in to comment.