mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue 3689: list_reverseiterator should support __length_hint__ instead of __len__.
This commit is contained in:
parent
048690410f
commit
f5b64116cc
3 changed files with 14 additions and 8 deletions
|
@ -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])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue