Skip to content

Commit

Permalink
fix: better test
Browse files Browse the repository at this point in the history
  • Loading branch information
MaksimMisin committed Apr 8, 2024
1 parent adb12d1 commit 80458c2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test_pytest_icdiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,15 +231,17 @@ def test_one():

def test_mutliline_strings_have_no_escaped_newlines(testdir):
testdir.makepyfile(
"""
r"""
def test_one():
one = "a\nb\nc\nd\ne\nf"
two = "a\nb\nc\nd\ne\nf\ng"
one = "a\nb\nc\nd"
two = "a\nb\nc\ndd"
assert one == two"""
)
output = testdir.runpytest("-vv", "--color=yes").stdout.str()
assert "\\n" not in output
assert "\n" in output
print(repr(output))
assert "a" + " " * 36 in output
assert "b" + " " * 36 in output
assert "c" + " " * 36 in output


def test_columns_are_calculated_outside_hook(testdir):
Expand Down

0 comments on commit 80458c2

Please sign in to comment.