New submission from Nathan Herring: We have some code that generates objects that inherit from Mapping that are not nearly as straightforward to instantiate in a test. It's much easier to have something like the follows:
foo = … # some collections.Mapping subtype self.assertEqual({'key': 'value'}, foo) unittest/case.py's _baseAssertEqual will print out both sides and let me do visual inspection, but I'd prefer it if it knew both sides supported Mapping and in the != case, performed an analog of assertDictEqual so I could just get the keys/values that were mismatched, especially in the cases of large dictionaries. ---------- components: Tests messages: 254902 nosy: Nathan Herring priority: normal severity: normal status: open title: unittest.assertEqual() on un-equal types inheriting from collections.Mapping type: enhancement versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25669> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com