[issue25669] unittest.assertEqual() on un-equal types inheriting from collections.Mapping

Michael Foord report at bugs.python.org
Mon Nov 23 06:40:48 EST 2015


Michael Foord added the comment:

assertEqual *does* do type checking and it's strict that it will only resort to the "type specific" assert checks if both types are of the same type. In the general case it's impossible to know whether comparing a subclass with the type specific check is the right thing to do - so unittest doesn't guess.

As you have a simple workaround ( dict(foo) ) I'm closing this.

----------
resolution:  -> rejected
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25669>
_______________________________________


More information about the Python-bugs-list mailing list