[Zope-Coders] range-related tests fail in OFS

Jeremy Hylton jeremy@zope.com
Tue, 2 Oct 2001 15:37:25 -0400 (EDT)


The testRanges module in OFS has three test failures.  I can't tell
who owns this code.  It looks like some simple off-by-one errors, but
it isn't obvious if the tests or the code is broken.  Ought to be
fixed either way.

Jeremy

Running: /usr/home/jeremy/src/Zope/lib/python/OFS/tests/testRanges.py

...........FFF........
======================================================================
FAIL: testMultipleRanges (testRanges.TestRequestRange)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/jeremy/src/Zope/lib/python/OFS/tests/testRanges.py", line 357, in testMultipleRanges
    self.expectMultipleRanges('3-7,10-15', [(3, 8), (10, 16)])
  File "/usr/home/jeremy/src/Zope/lib/python/OFS/tests/testRanges.py", line 284, in expectMultipleRanges
    'Part (%d, %d) is of wrong length, expected %d, got %d.' % (
  File "/usr/local/lib/python2.2/unittest.py", line 252, in failIf
    if expr: raise self.failureException, msg
AssertionError: Part (3, 8) is of wrong length, expected 5, got 6.

======================================================================
FAIL: testMultipleRangesBigFile (testRanges.TestRequestRange)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/jeremy/src/Zope/lib/python/OFS/tests/testRanges.py", line 362, in testMultipleRangesBigFile
    [(3, 701), (len(self.data) - 10000, len(self.data))])
  File "/usr/home/jeremy/src/Zope/lib/python/OFS/tests/testRanges.py", line 284, in expectMultipleRanges
    'Part (%d, %d) is of wrong length, expected %d, got %d.' % (
  File "/usr/local/lib/python2.2/unittest.py", line 252, in failIf
    if expr: raise self.failureException, msg
AssertionError: Part (3, 701) is of wrong length, expected 698, got 699.

======================================================================
FAIL: testMultipleRangesBigFileEndOverflow (testRanges.TestRequestRange)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/jeremy/src/Zope/lib/python/OFS/tests/testRanges.py", line 369, in testMultipleRangesBigFileEndOverflow
    [(3, 701), (len(self.data) - 100, len(self.data))])
  File "/usr/home/jeremy/src/Zope/lib/python/OFS/tests/testRanges.py", line 284, in expectMultipleRanges
    'Part (%d, %d) is of wrong length, expected %d, got %d.' % (
  File "/usr/local/lib/python2.2/unittest.py", line 252, in failIf
    if expr: raise self.failureException, msg
AssertionError: Part (3, 701) is of wrong length, expected 698, got 699.

----------------------------------------------------------------------
Ran 22 tests in 1.297s