Author Nathan Herring
Recipients Nathan Herring
Date 2015-11-19.14:59:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1447945164.43.0.781001179378.issue25669@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2015-11-19 14:59:24Nathan Herringsetrecipients: + Nathan Herring
2015-11-19 14:59:24Nathan Herringsetmessageid: <1447945164.43.0.781001179378.issue25669@psf.upfronthosting.co.za>
2015-11-19 14:59:24Nathan Herringlinkissue25669 messages
2015-11-19 14:59:23Nathan Herringcreate