diff options
author | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-03-20 17:21:27 (GMT) |
---|---|---|
committer | Michael Foord <fuzzyman@voidspace.org.uk> | 2010-03-20 17:21:27 (GMT) |
commit | 91c9da34bc155139618d3c837d9bc7cef1ac4a17 (patch) | |
tree | a4670094c20ab424654fbdfab0c5865e2f39ebf5 /Lib/unittest | |
parent | 8442a606b82683121fc38b462f54754e22be3535 (diff) | |
download | cpython-91c9da34bc155139618d3c837d9bc7cef1ac4a17.zip cpython-91c9da34bc155139618d3c837d9bc7cef1ac4a17.tar.gz cpython-91c9da34bc155139618d3c837d9bc7cef1ac4a17.tar.bz2 |
Issue 7832. Deprecating assertSameElements in Py3k.
Diffstat (limited to 'Lib/unittest')
-rw-r--r-- | Lib/unittest/case.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/unittest/case.py b/Lib/unittest/case.py index d9f35fe..0d224d8 100644 --- a/Lib/unittest/case.py +++ b/Lib/unittest/case.py @@ -700,10 +700,9 @@ class TestCase(object): msg: Optional message to use on failure instead of a list of differences. - For more general containership equality, assertSameElements will work - with things other than sets. This uses ducktyping to support - different types of sets, and is optimized for sets specifically - (parameters must support a difference method). + assertSetEqual uses ducktyping to support different types of sets, and + is optimized for sets specifically (parameters must support a + difference method). """ try: difference1 = set1.difference(set2) @@ -809,6 +808,8 @@ class TestCase(object): set(actual))`` but it works with sequences of unhashable objects as well. """ + warnings.warn('assertSameElements is deprecated', + DeprecationWarning) try: expected = set(expected_seq) actual = set(actual_seq) |