mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
Bug #1550714: fix SystemError from itertools.tee on negative value for n.
Needs backport to 2.5.1 and earlier.
This commit is contained in:
parent
6aefa916a9
commit
69e8897505
3 changed files with 9 additions and 2 deletions
|
@ -371,6 +371,7 @@ class TestBasicOps(unittest.TestCase):
|
|||
|
||||
# test values of n
|
||||
self.assertRaises(TypeError, tee, 'abc', 'invalid')
|
||||
self.assertRaises(ValueError, tee, [], -1)
|
||||
for n in xrange(5):
|
||||
result = tee('abc', n)
|
||||
self.assertEqual(type(result), tuple)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue