Skip to content

Commit 80458c2

Browse files
committed
fix: better test
1 parent adb12d1 commit 80458c2

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/test_pytest_icdiff.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,15 +231,17 @@ def test_one():
231231

232232
def test_mutliline_strings_have_no_escaped_newlines(testdir):
233233
testdir.makepyfile(
234-
"""
234+
r"""
235235
def test_one():
236-
one = "a\nb\nc\nd\ne\nf"
237-
two = "a\nb\nc\nd\ne\nf\ng"
236+
one = "a\nb\nc\nd"
237+
two = "a\nb\nc\ndd"
238238
assert one == two"""
239239
)
240240
output = testdir.runpytest("-vv", "--color=yes").stdout.str()
241-
assert "\\n" not in output
242-
assert "\n" in output
241+
print(repr(output))
242+
assert "a" + " " * 36 in output
243+
assert "b" + " " * 36 in output
244+
assert "c" + " " * 36 in output
243245

244246

245247
def test_columns_are_calculated_outside_hook(testdir):

0 commit comments

Comments
 (0)