Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert diff does not handle newline #1553

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

Assert diff does not handle newline #1553

Vogtinator opened this issue May 12, 2016 · 2 comments
Labels
topic: reporting related to terminal output and user-facing messages and errors topic: tracebacks related to displaying and handling of tracebacks type: bug problem that needs to be addressed

Comments

@Vogtinator
Copy link

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 nicoddemus added type: bug problem that needs to be addressed topic: reporting related to terminal output and user-facing messages and errors topic: tracebacks related to displaying and handling of tracebacks labels May 12, 2016
@nicoddemus
Copy link
Member

Thanks for the report!

@The-Compiler
Copy link
Member

Closing this as #1634 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: reporting related to terminal output and user-facing messages and errors topic: tracebacks related to displaying and handling of tracebacks type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

3 participants