Author gregory.p.smith
Recipients benjamin.peterson, giampaolo.rodola, gpolo, gregory.p.smith, gvanrossum, pupeno, purcell, rhettinger
Date 2009-03-28.23:02:57
SpamBayes Score 0.00278639
Marked as misclassified No
Message-id <>
Attaching a patch that adds Google's unittest.TestCase assertFooEqual()
extensions and automatically uses rich comparisons in assertEqual() with
nicely formatted failure messages for list, tuple, dict, set, frozenset.

The following are added by this patch:

+    def assertSequenceEqual(self, seq1, seq2, msg=None, seq_type=None):
+    def assertListEqual(self, list1, list2, msg=None):
+    def assertTupleEqual(self, tuple1, tuple2, msg=None):
+    def assertSetEqual(self, set1, set2, msg=None):
+    def assertIn(self, a, b, msg=None):
+    def assertNotIn(self, a, b, msg=None):
+    def assertDictEqual(self, d1, d2, msg=None):
+    def assertDictContainsSubset(self, expected, actual, msg=None):
+    def assertSameElements(self, expected_seq, actual_seq, msg=None):
+    def assertMultiLineEqual(self, first, second, msg=None):
+    def assertLess(self, a, b, msg=None):
+    def assertLessEqual(self, a, b, msg=None):
+    def assertGreater(self, a, b, msg=None):
+    def assertGreaterEqual(self, a, b, msg=None):
+    def assertIsNone(self, obj, msg=None):
+    def assertIsNotNone(self, obj, msg='unexpectedly None'):
+    def assertRaisesWithRegexpMatch(self, expected_exception,

As I said in the dev summit, I'll get some stats on how often each of
these are used relative to others from a large code base which has had
access to them for some time as an indicator of what may or may not be
worth making standard.

I did not include assertCommandSucceeds or assertCommandFails as those
are more difficult to do the right thing for everyone on cross platform
and our internal implementations use some other messy and not
integration-worthy internal libraries at the moment.
Date User Action Args
2009-03-28 23:03:07gregory.p.smithsetrecipients: + gregory.p.smith, gvanrossum, rhettinger, purcell, giampaolo.rodola, pupeno, benjamin.peterson, gpolo
2009-03-28 23:03:07gregory.p.smithsetmessageid: <>
2009-03-28 23:03:06gregory.p.smithlinkissue2578 messages
2009-03-28 23:03:03gregory.p.smithcreate