b.t.t.TestRangeFileMixin(object) : class documentation

Part of bzrlib.tests.test_http_response View In Hierarchy

Known subclasses: bzrlib.tests.test_http_response.TestRangeFileMultipleRanges, bzrlib.tests.test_http_response.TestRangeFileSingleRange, bzrlib.tests.test_http_response.TestRangeFileSizeKnown, bzrlib.tests.test_http_response.TestRangeFileSizeUnknown

Tests for accessing the first range in a RangeFile.
Method test_can_read_at_first_access Test that the just created file can be read.
Method test_seek_read Test seek/read inside the range.
Method test_read_zero Undocumented
Method test_seek_at_range_end Undocumented
Method test_read_at_range_end Test read behaviour at range end.
Method test_unbounded_read_after_seek Undocumented
Method test_seek_backwards Undocumented
Method test_seek_outside_single_range Undocumented
Method test_read_past_end_of_range Undocumented
Method test_seek_from_end Test seeking from the end of the file.
def test_can_read_at_first_access(self):
Test that the just created file can be read.
def test_seek_read(self):
Test seek/read inside the range.
def test_read_zero(self):
def test_seek_at_range_end(self):
def test_read_at_range_end(self):
Test read behaviour at range end.
def test_unbounded_read_after_seek(self):
def test_seek_backwards(self):
def test_seek_outside_single_range(self):
def test_read_past_end_of_range(self):
def test_seek_from_end(self):
Test seeking from the end of the file.

The semantic is unclear in case of multiple ranges. Seeking from end exists only for the http transports, cannot be used if the file size is unknown and is not used in bzrlib itself. This test must be (and is) overridden by daughter classes.

Reading from end makes sense only when a range has been requested from the end of the file (see HttpTransportBase._get() when using the 'tail_amount' parameter). The HTTP response can only be a whole file or a single range.

API Documentation for Bazaar, generated by pydoctor at 2020-07-06 00:55:29.