Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Checkins

cpython (2.7): #14832: 'first' now really refers to first arg in unittest assertItemsEqual

 

 

Python checkins RSS feed   Index | Next | Previous | View Threaded


python-checkins at python

May 16, 2012, 11:01 AM

Post #1 of 1 (61 views)
Permalink
cpython (2.7): #14832: 'first' now really refers to first arg in unittest assertItemsEqual

http://hg.python.org/cpython/rev/ff52583a5576
changeset: 77003:ff52583a5576
branch: 2.7
parent: 77000:30d16d1e5175
user: R David Murray <rdmurray [at] bitdance>
date: Wed May 16 14:01:03 2012 -0400
summary:
#14832: 'first' now really refers to first arg in unittest assertItemsEqual

This appears to have been a mixup introduced when we switched from
'expected/actual' to 'first/second'. The problem doesn't exist
in the corresponding assertCountEqual method in Python3.

files:
Lib/unittest/case.py | 2 +-
Misc/NEWS | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py
--- a/Lib/unittest/case.py
+++ b/Lib/unittest/case.py
@@ -872,7 +872,7 @@
- [0, 1, 1] and [1, 0, 1] compare equal.
- [0, 0, 1] and [0, 1] compare unequal.
"""
- first_seq, second_seq = list(actual_seq), list(expected_seq)
+ first_seq, second_seq = list(expected_seq), list(actual_seq)
with warnings.catch_warnings():
if sys.py3kwarning:
# Silence Py3k warning raised during the sorting
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -60,6 +60,9 @@
Library
-------

+- Issue #14832: fixed the order of the argument references in the error
+ message produced by unittest's assertItemsEqual.
+
- Issue #14829: Fix bisect issues under 64-bit Windows.

- Issue #14777: tkinter may return undecoded UTF-8 bytes as a string when

--
Repository URL: http://hg.python.org/cpython

Python checkins RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.