summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2002-06-21 02:14:10 (GMT)
committerGuido van Rossum <guido@python.org>2002-06-21 02:14:10 (GMT)
commit10f36d9f0b455e0b5b0b61173037d7e13e3fd94d (patch)
treed23ca685ccd2139fe8e0514a0f58748c2417f3b9
parentc7c36503ebc1c9fc166ca3c27dd8d7ee8b8eb5ed (diff)
downloadcpython-10f36d9f0b455e0b5b0b61173037d7e13e3fd94d.zip
cpython-10f36d9f0b455e0b5b0b61173037d7e13e3fd94d.tar.gz
cpython-10f36d9f0b455e0b5b0b61173037d7e13e3fd94d.tar.bz2
Add a check that the bug Jeremy just fixed in _PyTuple_Resize() is
fixed. (Jeremy, how did you discover that?)
-rw-r--r--Lib/test/test_types.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py
index 494a13a..bec0237 100644
--- a/Lib/test/test_types.py
+++ b/Lib/test/test_types.py
@@ -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([])'