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.
Created on 2012年05月16日 16:47 by Kylotan, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg160887 - (view) | Author: (Kylotan) | Date: 2012年05月16日 16:47 | |
I have the following line in a unit test in 2.7.3: self.assertItemsEqual(['a', 'b', 'c'], ['a', 'b', 'c', 'd']) I expect this output: AssertionError: Element counts were not equal: First has 0, Second has 1: 'd' Instead I get this output: AssertionError: Element counts were not equal: First has 1, Second has 0: 'd' I would expect 'First' to refer to the first sequence I pass to assertItemsEqual, not the second, and vice versa. (Obviously in a trivial example like this it appears unimportant, but when debugging why a test has failed, the unexpected ordering can cause problems.) |
|||
| msg160900 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年05月16日 18:01 | |
New changeset ff52583a5576 by R David Murray in branch '2.7': #14832: 'first' now really refers to first arg in unittest assertItemsEqual http://hg.python.org/cpython/rev/ff52583a5576 |
|||
| msg160901 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年05月16日 18:02 | |
Thanks, fixed. Appears to have been a mistake made when we refactored from expected/actual to first/second. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:30 | admin | set | github: 59037 |
| 2013年03月19日 02:21:56 | r.david.murray | link | issue17459 superseder |
| 2012年05月16日 18:02:59 | r.david.murray | set | status: open -> closed type: behavior nosy: + r.david.murray messages: + msg160901 resolution: fixed stage: resolved |
| 2012年05月16日 18:01:49 | python-dev | set | nosy:
+ python-dev messages: + msg160900 |
| 2012年05月16日 16:47:48 | Kylotan | create | |