From 83961245b4db5d50a533e6f20d9472175d18d5e3 Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Fri, 24 Dec 2010 00:48:47 +0000 Subject: Add test for r87454. --- Lib/unittest/test/test_case.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/unittest/test/test_case.py b/Lib/unittest/test/test_case.py index 3376428..027b37a 100644 --- a/Lib/unittest/test/test_case.py +++ b/Lib/unittest/test/test_case.py @@ -691,6 +691,9 @@ class Test_TestCase(unittest.TestCase, TestEquality, TestHashing): # Test that sequences of unhashable objects can be tested for sameness: self.assertCountEqual([[1, 2], [3, 4], 0], [False, [3, 4], [1, 2]]) + # Test that iterator of unhashable objects can be tested for sameness: + self.assertCountEqual(iter([1, 2, [], 3, 4]), + iter([1, 2, [], 3, 4])) # hashable types, but not orderable self.assertRaises(self.failureException, self.assertCountEqual, -- cgit v0.12