Skip to content

Commit 326bea9

Browse files
Fix failure on line endings
1 parent 80fb4d2 commit 326bea9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_app.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -493,10 +493,11 @@ def editor(qtbot):
493493

494494
return qtbot, win
495495

496-
def test_editor(monkeypatch,editor):
496+
def conv_line_ends(text):
497+
498+
return '\n'.join(text.splitlines())
497499

498-
def conv_line_ends(text):
499-
return '\n'.join(text.splitlines())
500+
def test_editor(monkeypatch,editor):
500501

501502
qtbot, editor = editor
502503

@@ -1050,7 +1051,7 @@ def ok(*args, **kwargs):
10501051

10511052
editor.new()
10521053
assert(editor.modified == True)
1053-
assert(editor.get_text_with_eol() == code)
1054+
assert(conv_line_ends(editor.get_text_with_eol()) == code)
10541055

10551056
monkeypatch.setattr(QMessageBox, 'question',
10561057
staticmethod(ok))

0 commit comments

Comments
 (0)