Skip to content

Commit

Permalink
Change name of test_selection_replace_plain_regex.
Browse files Browse the repository at this point in the history
Because it use normal replace not replace in selection.
  • Loading branch information
rlaverde committed Nov 8, 2017
1 parent 70cbaf3 commit 0f4fb99
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions spyder/widgets/tests/test_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,19 +320,17 @@ def test_replace_enter_press(editor_find_replace_bot):
qtbot.keyPress(finder.search_text, Qt.Key_Return, modifier=Qt.ShiftModifier)
assert editor.get_cursor_line_column() == (3,4)

def test_selection_replace_plain_regex(editor_find_replace_bot):
def test_replace_plain_regex(editor_find_replace_bot):
"""Test that regex reserved characters are displayed as plain text."""
editor_stack, editor, finder, qtbot = editor_find_replace_bot
expected_new_text = ('.\\[()]*test bacon\n'
'spam sausage\n'
'spam egg')
old_text = editor.toPlainText()
finder.show()
finder.show_replace()
qtbot.keyClicks(finder.search_text, 'spam')
qtbot.keyClicks(finder.replace_text, '.\[()]*test')
qtbot.keyPress(finder.replace_text, Qt.Key_Return)
text = editor.toPlainText()[0:-1]
assert editor.toPlainText()[0:-1] == expected_new_text

def test_replace_invalid_regex(editor_find_replace_bot):
Expand Down

0 comments on commit 0f4fb99

Please sign in to comment.