Thanks for fixing the last bug so quickly.
Here's some more tests to add that currently fail with 2.4 and not
with 2.3. Negative offsets should always be forbidden, and you
should not be able to extend the length of a nested buffer by giving
a longer length on the outer one.
try: buffer(buffer('asdf', 1), -1)
except ValueError: pass
else: raise TestFailed, "buffer(buffer('asdf', 1), -1) should raise
ValueError"
if str(buffer(buffer('asdf', 0, 2), 0)) != 'as':
raise TestFailed, 'composing length-specified buffer failed'
if str(buffer(buffer('asdf', 0, 2), 0, 5000)) != 'as':
raise TestFailed, 'composing length-specified buffer with length
on outer failed'
if str(buffer(buffer('asdf', 0, 2), 0, -1)) != 'as':
raise TestFailed, 'composing length-specified buffer with -1
length on outer failed'
if str(buffer(buffer('asdf', 0, 2), 1, 2)) != 's':
raise TestFailed, 'composing length-specified buffer with length
and offset on outer failed'
|