Ezio Melotti <ezio.melo...@gmail.com> added the comment:

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.

----------
keywords: +patch
Added file: http://bugs.python.org/file20103/issue10573.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10573>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to