diff options
author | Raymond Hettinger <python@rcn.com> | 2008-12-02 21:33:45 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2008-12-02 21:33:45 (GMT) |
commit | f5b64116cc85d82df021aa30bbd63f9823b0efeb (patch) | |
tree | 871cdc4c5885d048a1500509ec60552c5725cf9e /Lib/test/list_tests.py | |
parent | 048690410f6ad62327e6cde573d6e8b702ea708b (diff) | |
download | cpython-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.py | 2 |
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]) |