From 6949392b56e5bb386c1157fc8d337a67647c9248 Mon Sep 17 00:00:00 2001 From: R David Murray Date: Wed, 16 May 2012 14:01:03 -0400 Subject: [PATCH] #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. --- Lib/unittest/case.py | 2 +- Misc/NEWS | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py index 18dee026757..f334b5b71d1 100644 --- a/Lib/unittest/case.py +++ b/Lib/unittest/case.py @@ -872,7 +872,7 @@ class TestCase(object): - [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 index c2be420880e..4908f39c2bd 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -60,6 +60,9 @@ Core and Builtins 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