summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2010-12-24 00:48:47 (GMT)
committerRaymond Hettinger <python@rcn.com>2010-12-24 00:48:47 (GMT)
commit83961245b4db5d50a533e6f20d9472175d18d5e3 (patch)
treedfbd125880025a196bc037acbe25fc6ea5d31815 /Lib/unittest/test
parentb2eacd91290baa63ac0f206ced26cfe12a65d10d (diff)
downloadcpython-83961245b4db5d50a533e6f20d9472175d18d5e3.zip
cpython-83961245b4db5d50a533e6f20d9472175d18d5e3.tar.gz
cpython-83961245b4db5d50a533e6f20d9472175d18d5e3.tar.bz2
Add test for r87454.
Diffstat (limited to 'Lib/unittest/test')
-rw-r--r--Lib/unittest/test/test_case.py3
1 files changed, 3 insertions, 0 deletions
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,