Commit 02b28ec3 authored by Michael W. Hudson's avatar Michael W. Hudson

Test for

[ 526039 ] devious code can crash structseqs

Bugfix candidate.
parent 0e02530a
......@@ -13,4 +13,16 @@ for i in range(-len(t), len(t)):
for j in range(-len(t), len(t)):
vereq(t[i:j], astuple[i:j])
# Devious code could crash structseqs' contructors
class C:
def __getitem__(self, i):
raise IndexError
def __len__(self):
return 9
try:
repr(time.struct_time(C()))
except:
pass
# XXX more needed
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment