Skip to content
Permalink
Browse files

Add message to newline assertions

Compensating for pytest-dev/pytest#3443
  • Loading branch information...
altendky committed May 3, 2018
1 parent 536d6fe commit ab63176851def334508a162437b3670eee4c9355
Showing with 10 additions and 2 deletions.
  1. +10 −2 tests/integration/test_project.py
@@ -90,7 +90,11 @@ def test_maintain_file_line_endings(PipenvInstance, pypi, newlines, target):
with io.open(path) as f:
contents = f.read()

assert f.newlines == u'\n'
assert f.newlines == u'\n', "expected {}, got {}".format(
repr(u'\n'),
repr(f.newlines),
)
# message because of https://github.com/pytest-dev/pytest/issues/3443

with io.open(path, 'w', newline=newlines) as f:
f.write(contents)
@@ -106,4 +110,8 @@ def test_maintain_file_line_endings(PipenvInstance, pypi, newlines, target):
f.read()
actual_newlines = f.newlines

assert actual_newlines == newlines
assert actual_newlines == newlines, "expected {}, got {}".format(
repr(newlines),
repr(actual_newlines),
)
# message because of https://github.com/pytest-dev/pytest/issues/3443

0 comments on commit ab63176

Please sign in to comment.
You can’t perform that action at this time.