Michael Foord mich...@voidspace.org.uk added the comment:
Patch to docs and minor change to assertCountEqual to not use actual / expected
internally.
--
Added file: http://bugs.python.org/file20580/expected-actual.diff
___
Python tracker
R. David Murray rdmur...@bitdance.com added the comment:
Code patch looks good to me. Unittest tests pass.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10573
___
Changes by Michael Foord mich...@voidspace.org.uk:
--
resolution: - fixed
stage: commit review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10573
Michael Foord mich...@voidspace.org.uk added the comment:
There was a BDFL ruling on python-dev mailing list that assert argument names
should be (first, second).
See:
http://mail.python.org/pipermail/python-dev/2010-December/106954.html
I'm basically reverting the patch to go back to
Michael Foord mich...@voidspace.org.uk added the comment:
Note that I looked at making the sequence comparison code symmetric - but it
generates nice diffs for even nested containers by using prettyprint and
difflib. Switching to a symmetric output (in first, not in second etc) would
be very
Ezio Melotti ezio.melo...@gmail.com added the comment:
Not all the arg names in the doc match with the actual name of the args
(probably because the methods are expected to be used with positional args
only), that's why the changes affects only the doc.
--
Ron Adam ron_a...@users.sourceforge.net added the comment:
The issue10573.diff file with the time stamp 20:03 has a lot of document
changes that don't have corresponding code changes?
--
nosy: +ron_adam
___
Python tracker rep...@bugs.python.org
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
Georg Brandl ge...@python.org added the comment:
If Michael and Raymond reach a consensus, this can go in before beta2.
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10573
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
These three changes look fine.
The argument order for assertDictContainsSubset is problematic (doesn't match
its own name and doesn't match the order for other __contains__ methods
elsewhere in Python), but it's too late
Michael Foord mich...@voidspace.org.uk added the comment:
The argument order doesn't match the name (which isn't a huge deal I don't
think) - but subset in dict does match the element in container order of
assertIn.
--
___
Python tracker
Ezio Melotti ezio.melo...@gmail.com added the comment:
Fixed in r87389. This can be backported to 3.1/2.7 where applicable.
--
stage: needs patch - commit review
Added file: http://bugs.python.org/file20105/issue10573.diff
___
Python tracker
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
This should get fixed-up before the second beta.
Try to confirm the most common argument ordering using Google's code search to
ascertain actual practice in real code.
FWIW, I also tend to use actual/expected and find the
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
assignee: michael.foord - ezio.melotti
nosy: +ezio.melotti
stage: - needs patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue10573
___
New submission from Michael Foord mich...@voidspace.org.uk:
The unittest documentation, argument names and implementation need to be
consistent about the order of (actual, expected) for TestCase.assert methods
that take two arguments.
This is particularly relevant for the methods that
15 matches
Mail list logo