]> granicus.if.org Git - python/commitdiff
Add a check that the bug Jeremy just fixed in _PyTuple_Resize() is
authorGuido van Rossum <guido@python.org>
Fri, 21 Jun 2002 02:14:10 +0000 (02:14 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 21 Jun 2002 02:14:10 +0000 (02:14 +0000)
fixed.

(Jeremy, how did you discover that?)

Lib/test/test_types.py

index 494a13a5185a9d4884aee46536ee84e9dbc4f3e2..bec023728be26bff816f852074f424ff202834fb 100644 (file)
@@ -244,6 +244,11 @@ vereq(a[-100:100:], a)
 vereq(a[100:-100:-1], a[::-1])
 vereq(a[-100L:100L:2L], (0,2,4))
 
+# Check that a specific bug in _PyTuple_Resize() is squashed.
+def f():
+    for i in range(1000):
+        yield i
+vereq(list(tuple(f())), range(1000))
 
 print '6.5.3 Lists'
 if len([]) != 0: raise TestFailed, 'len([])'