def test_get_range_data(self): data = '0123456789' data_subset = get_range_data(data, '0-4') self.assertEqual('01234', data_subset) data_subset = get_range_data(data, '5-9') self.assertEqual('56789', data_subset)
def test_get_range_data_with_last_byte_pos(self): data = '0123456789' data_subset = get_range_data(data, '-3') self.assertEqual('789', data_subset)