No subject
Tue Dec 4 09:57:09 GMT 2007
never triggered the next range recognition, so I went ahead and
did that (which reveals another subtle bug in seek). Now reading
again when a range is exhausted start reading the next range
without seek being required (as it was before that).
This is already more than what is used by bzrlib so I stop here
(but the TDD exercise was worth it).
<snip/>
Andrew> I wonder a little if we'll eventually decide to use
Andrew> the same test parameterisation framework as for
Andrew> e.g. repository implementations, but this is quite
Andrew> readable so I have no qualms about landing it as is.
I didn't here fr lack of experience in using them but I was
planning to use it on my https test server branch anyway.
Andrew> [...]
>> +class TestRangeFilMultipleRanges(tests.TestCase, TestRangeFileMixin=
):
>> + """Test a RangeFile for multiple ranges."""
Andrew> I think a little more detail in this docstring (or
Andrew> maybe setUp's docstring) about the exact layout of
Andrew> this RangeFile would be good; the code in this setUp
Andrew> is just long enough that it's hard to see what
Andrew> self._file is like at a glance.
Done.
Andrew> Is it worth doing:
Andrew> elif self._range_hint =3D 'single':
Andrew> max_ranges =3D total
Andrew> else:
Andrew> raise AssertionError("Unknown _range_hint %r" % (se=
lf._range_hint,))
Andrew> ?
It doesn't harm and will be covered by a test once I use
--coverage there too.
Interesting journey !
Vincent
More information about the bazaar
mailing list