summaryrefslogtreecommitdiffstats
path: root/Lib/test/list_tests.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2008-12-02 21:33:45 (GMT)
committerRaymond Hettinger <python@rcn.com>2008-12-02 21:33:45 (GMT)
commitf5b64116cc85d82df021aa30bbd63f9823b0efeb (patch)
tree871cdc4c5885d048a1500509ec60552c5725cf9e /Lib/test/list_tests.py
parent048690410f6ad62327e6cde573d6e8b702ea708b (diff)
downloadcpython-f5b64116cc85d82df021aa30bbd63f9823b0efeb.zip
cpython-f5b64116cc85d82df021aa30bbd63f9823b0efeb.tar.gz
cpython-f5b64116cc85d82df021aa30bbd63f9823b0efeb.tar.bz2
Issue 3689: list_reverseiterator should support __length_hint__ instead of __len__.
Diffstat (limited to 'Lib/test/list_tests.py')
-rw-r--r--Lib/test/list_tests.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/list_tests.py b/Lib/test/list_tests.py
index 6250908..5b1aa75 100644
--- a/Lib/test/list_tests.py
+++ b/Lib/test/list_tests.py
@@ -93,6 +93,8 @@ class CommonTest(seq_tests.CommonTest):
self.assertRaises(StopIteration, next, r)
self.assertEqual(list(reversed(self.type2test())),
self.type2test())
+ # Bug 3689: make sure list-reversed-iterator doesn't have __len__
+ self.assertRaises(TypeError, len, reversed([1,2,3]))
def test_setitem(self):
a = self.type2test([0, 1])