[issue14025] unittest.TestCase.assertEqual does not show diff when comparing str with unicode
Jaap Karssenberg
report at bugs.python.org
Thu Feb 16 10:15:10 CET 2012
Jaap Karssenberg <jaap.karssenberg at gmail.com> added the comment:
On Thu, Feb 16, 2012 at 12:29 AM, Michael Foord <report at bugs.python.org>wrote:
> The type check in assertEqual, that delegates to the different comparison
> methods, is strict because we can't know that using the error message
> algorithms is sane for arbitrary subclasses - all we can know is whether an
> equality comparison fails or succeeds.
>
So would you allow me to register a method for type "basestring" and have
assertEqual dispatch to that method when both arguments are of this type ?
That way at least I could customize the behavior in sub classes.
Thanks,
Jaap
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14025>
_______________________________________
More information about the Python-bugs-list
mailing list