[Python-checkins] r87466 - python/branches/py3k/Lib/unittest/test/test_case.py

raymond.hettinger python-checkins at python.org
Fri Dec 24 01:48:47 CET 2010


Author: raymond.hettinger
Date: Fri Dec 24 01:48:47 2010
New Revision: 87466

Log:
Add test for r87454.

Modified:
   python/branches/py3k/Lib/unittest/test/test_case.py

Modified: python/branches/py3k/Lib/unittest/test/test_case.py
==============================================================================
--- python/branches/py3k/Lib/unittest/test/test_case.py	(original)
+++ python/branches/py3k/Lib/unittest/test/test_case.py	Fri Dec 24 01:48:47 2010
@@ -691,6 +691,9 @@
 
         # 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,


More information about the Python-checkins mailing list