New submission from Jaap Karssenberg <jaap.karssenb...@gmail.com>:

When you compare two multiline strings with unittest.TestCase.assertEqual it is 
supposed to dispatch to assertMultiLineEqual and show a diff when the strings 
differ.

However this only works for two string of the same type (str or unicode). But 
mixing the two will just give the default message that they differ without the 
diff. THis is due to the way the dispatch checks types. Probably need to make 
an exception for comparing str with unicode.

Note that if the contents of both strings are the same, the assert will regard 
them equal, so it is not a strict check on the type perse.

----------
components: Library (Lib)
messages: 153434
nosy: jaap.karssenberg
priority: normal
severity: normal
status: open
title: unittest.TestCase.assertEqual does not show diff when comparing str with 
unicode
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14025>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to