Assert diff does not handle newline #1553

Closed
Vogtinator opened this Issue May 12, 2016 · 2 comments

Comments

Projects
None yet
3 participants
@Vogtinator

Source:

def test_diff2():
    assert "asdf" == "asdf2"

def test_diff():
    assert "asdf" == "asdf\n"

Output:

======================================= FAILURES ========================================
______________________________________ test_diff2 _______________________________________
test_diff.py:4: in test_diff2
    assert "asdf" == "asdf2"
E   assert 'asdf' == 'asdf2'
E     - asdf
E     + asdf2
E     ?     +
_______________________________________ test_diff _______________________________________
test_diff.py:7: in test_diff
    assert "asdf" == "asdf\n"
E   assert 'asdf' == 'asdf\n'
E       asdf
=============================== 2 failed in 0.01 seconds ================================

Environment: platform linux -- Python 3.5.1, pytest-2.9.1, py-1.4.31, pluggy-0.3.1

@nicoddemus

This comment has been minimized.

Show comment
Hide comment
@nicoddemus

nicoddemus May 12, 2016

Member

Thanks for the report!

Member

nicoddemus commented May 12, 2016

Thanks for the report!

@The-Compiler

This comment has been minimized.

Show comment
Hide comment
@The-Compiler

The-Compiler Jun 22, 2016

Member

Closing this as #1634 has been merged.

Member

The-Compiler commented Jun 22, 2016

Closing this as #1634 has been merged.

This was referenced Aug 19, 2016

This was referenced Nov 14, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment