diff options
author | Michael Foord <fuzzyman@voidspace.org.uk> | 2009-04-04 18:55:09 +0000 |
---|---|---|
committer | Michael Foord <fuzzyman@voidspace.org.uk> | 2009-04-04 18:55:09 +0000 |
commit | a5809c84b392ef855ac18b17967c9f7e34118053 (patch) | |
tree | a50c177030a0710e73b9c96c46a4ed57e3feff29 /Lib/test/test_unittest.py | |
parent | 270a9ceb5b5dd72792ee88d5420417105cedcb2b (diff) | |
download | cpython-git-a5809c84b392ef855ac18b17967c9f7e34118053.tar.gz |
Patch for Py3k with fallback for comparing unsortable sequences in
assertSameElements.
Removed the expected failure and added another test case to confirm that
this patch works for unsortable sequences that are the same (no fail)
and different (fail).
Issue #2578
Diffstat (limited to 'Lib/test/test_unittest.py')
-rw-r--r-- | Lib/test/test_unittest.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_unittest.py b/Lib/test/test_unittest.py index 33204f87b1..aaa3dc545f 100644 --- a/Lib/test/test_unittest.py +++ b/Lib/test/test_unittest.py @@ -2392,8 +2392,6 @@ class Test_TestCase(TestCase, TestEquality, TestHashing): self.assertRaises(self.failureException, self.assertEqual, a, b, msg='foo') - # The fact that dictionaries are unorderable breaks this test for them. - @unittest.expectedFailure def testEquality(self): self.assertListEqual([], []) self.assertTupleEqual((), ()) @@ -2459,6 +2457,8 @@ class Test_TestCase(TestCase, TestEquality, TestHashing): self.assertSameElements([{'a': 1}, {'b': 2}], [{'b': 2}, {'a': 1}]) self.assertRaises(self.failureException, self.assertSameElements, [[1]], [[2]]) + self.assertRaises(self.failureException, self.assertSameElements, + [{'a': 1}, {'b': 2}], [{'b': 2}, {'a': 2}]) def testAssertSetEqual(self): set1 = set() |