mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Convert iterator __len__() methods to a private API.
This commit is contained in:
parent
9ceebd5445
commit
6b27cda643
16 changed files with 169 additions and 94 deletions
|
@ -670,6 +670,7 @@ class TestVariousIteratorArgs(unittest.TestCase):
|
|||
class LengthTransparency(unittest.TestCase):
|
||||
|
||||
def test_repeat(self):
|
||||
from test.test_iterlen import len
|
||||
self.assertEqual(len(repeat(None, 50)), 50)
|
||||
self.assertRaises(TypeError, len, repeat(None))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue