]> granicus.if.org Git - python/commitdiff
Add test for r87454.
authorRaymond Hettinger <python@rcn.com>
Fri, 24 Dec 2010 00:48:47 +0000 (00:48 +0000)
committerRaymond Hettinger <python@rcn.com>
Fri, 24 Dec 2010 00:48:47 +0000 (00:48 +0000)
Lib/unittest/test/test_case.py

index 3376428c6a9382bb40ba5169fd955f7cf4be8435..027b37ac987df267699a8a6e5992211d0218d772 100644 (file)
@@ -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,