This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pynewbie
Recipients chris.jerdonek, ezio.melotti, michael.foord, pynewbie, r.david.murray, rbcollins
Date 2016-01-13.06:04:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1452665059.48.0.421900341342.issue24780@psf.upfronthosting.co.za>
In-reply-to
Content
There is another case where the error message displayed by self.assertEqual() is weird. 

======================================================================
FAIL: test_newline_1 (__main__.AssertEqualTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 9, in test_newline_1
    self.assertEqual("\n abc", "\n abd")
AssertionError: '\n abc' != '\n abd'
  
-  abc?    ^
+  abd?    ^


======================================================================
FAIL: test_newline_2 (__main__.AssertEqualTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test.py", line 12, in test_newline_2
    self.assertEqual("\nabc", "\nabd")
AssertionError: '\nabc' != '\nabd'
  
- abc+ abd


----------------------------------------------------------------------

There is a difference in between "\nabc" and "\n abc" and hence the difference between output
History
Date User Action Args
2016-01-13 06:04:19pynewbiesetrecipients: + pynewbie, rbcollins, ezio.melotti, r.david.murray, michael.foord, chris.jerdonek
2016-01-13 06:04:19pynewbiesetmessageid: <1452665059.48.0.421900341342.issue24780@psf.upfronthosting.co.za>
2016-01-13 06:04:19pynewbielinkissue24780 messages
2016-01-13 06:04:19pynewbiecreate