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.

classification
Title: assertSameElements doesn't filter enough py3k warnings
Type: behavior Stage: resolved
Components: Library (Lib), Tests Versions: Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: ezio.melotti, flox, michael.foord
Priority: normal Keywords: easy, needs review, patch

Created on 2010-02-02 10:32 by ezio.melotti, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue7837.patch ezio.melotti, 2010-02-02 10:32 patch for trunk + tests
issue7837v2.patch ezio.melotti, 2010-02-02 15:07 patch for trunk + tests
issue7837_assertSameElements.diff flox, 2010-02-02 15:18 Patch, apply to trunk
Messages (4)
msg98726 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-02-02 10:32
In assertSameElements ( Lib/unittest/case.py ) there's a filter for py3k warning that checks for warning about dict comparisons but not for comparisons of unequal types. If python is run with the -3 flag and a non-hashable sequence with elements of different types is passed to assertSameElements the warning is not silenced. There's also a third warning that might be raised if among the elements there's a builtin function or method.

Patch attached.
msg98743 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-02-02 15:07
New patch that filters one more warning.
msg98744 - (view) Author: Florent Xicluna (flox) * (Python committer) Date: 2010-02-02 15:18
Variant based on the previous patches.

It fixes an error relative to assertSameElements: comparing sequences which contain unorderable types.

Example: [2j, 5j, set(), frozenset()]


The util.unorderable_list_difference() helper is backported from 3.x.
msg100656 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-03-08 16:40
Fixed in r78757 (trunk). I opened #8088 for the unorderable types problem.
History
Date User Action Args
2022-04-11 14:56:57adminsetgithub: 52085
2010-03-08 16:40:57ezio.melottisetstatus: open -> closed
messages: + msg100656

keywords: patch, patch, easy, needs review
resolution: fixed
stage: patch review -> resolved
2010-02-02 15:18:15floxsetkeywords: patch, patch, easy, needs review
files: + issue7837_assertSameElements.diff
messages: + msg98744
2010-02-02 15:13:41ezio.melottisetkeywords: patch, patch, easy, needs review
assignee: ezio.melotti
2010-02-02 15:07:03ezio.melottisetkeywords: patch, patch, easy, needs review
assignee: ezio.melotti -> (no value)
messages: + msg98743

files: + issue7837v2.patch
2010-02-02 12:58:03michael.foordsetkeywords: patch, patch, easy, needs review
assignee: ezio.melotti
2010-02-02 10:32:55ezio.melotticreate