Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 10f36d9

Browse files
committed
Add a check that the bug Jeremy just fixed in _PyTuple_Resize() is
fixed. (Jeremy, how did you discover that?)
1 parent c7c3650 commit 10f36d9

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Lib/test/test_types.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,11 @@ class C: pass
244244
vereq(a[100:-100:-1], a[::-1])
245245
vereq(a[-100L:100L:2L], (0,2,4))
246246

247+
# Check that a specific bug in _PyTuple_Resize() is squashed.
248+
def f():
249+
for i in range(1000):
250+
yield i
251+
vereq(list(tuple(f())), range(1000))
247252

248253
print '6.5.3 Lists'
249254
if len([]) != 0: raise TestFailed, 'len([])'

0 commit comments

Comments
 (0)