This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients ezio.melotti, michael.foord, rhettinger
Date 2010-12-18.16:37:29
SpamBayes Score 1.5467905e-09
Marked as misclassified No
Message-id <1292690251.84.0.362767551205.issue10573@psf.upfronthosting.co.za>
In-reply-to
Content
The attached patch changes the following things

- assertDictContainsSubset(expected, actual, msg=None)
+ assertDictContainsSubset(subset, dictionary, msg=None)
This doesn't change the order of the args, even though the name of the method might suggest the opposite.  In the output message I left expected and actual because imho it makes sense there (e.g. "key, expected: 3, actual: 5").  This could be changed to expected/got or something else.


- assertCountEqual(expected, actual, msg=None)
+ assertCountEqual(actual, expected, msg=None)
This changes the order of the args and as a consequence the list of 'missing' and 'unexpected' elements will be swapped.  The tests don't check the error message so they all pass without modification.  It should be noted that this method didn't exist in 3.1. However 2.7 has the equivalent assertItemsEqual with the args swapped, so maybe it should be documented somewhere that while porting from 2.7 to 3.2 the order of the args should be changed accordingly.


- assertDictEqual(expected, actual, msg=None)
+ assertDictEqual(dict1, dict2, msg=None)
This is just a doc change, the actual method already uses d1 and d2 as args and their order doesn't seem to matter.

The other methods (mainly the assert*Equal) are just documented with generic first/second or foo1/foo2.  The doc for these methods could be changed to use actual/expected as a preferred order.
History
Date User Action Args
2010-12-18 16:37:32ezio.melottisetrecipients: + ezio.melotti, rhettinger, michael.foord
2010-12-18 16:37:31ezio.melottisetmessageid: <1292690251.84.0.362767551205.issue10573@psf.upfronthosting.co.za>
2010-12-18 16:37:29ezio.melottilinkissue10573 messages
2010-12-18 16:37:29ezio.melotticreate