示例#1
0
 def test_should_return_rest_of_data_on_last_iteration(self):
     input = ['1234', '56']
     result = list(s3upload.data_collector(input, def_buf_size=3))
     self.assertEqual(result, ['123', '456'])
示例#2
0
 def test_a_single_item_should_still_be_buffered_even_if_it_is_above_the_buffer_size(self):
     input = ['123456']
     result = list(s3upload.data_collector(input, def_buf_size=3))
     self.assertEqual(result, ['123', '456'])
示例#3
0
 def test_should_be_able_to_read_single_yield(self):
     input = ['123']
     result = list(s3upload.data_collector(input, def_buf_size=3))
     self.assertEqual(result, ['123'])
示例#4
0
 def test_should_be_able_to_yield_data_less_than_buffer_size(self):
     input = ['123']
     result = list(s3upload.data_collector(input, def_buf_size=6))
     self.assertEqual(result, ['123'])
示例#5
0
 def test_should_be_able_to_read_every_byte_of_data(self):
     input = ['12345']
     result = list(s3upload.data_collector(input, def_buf_size=3))
     self.assertEqual(result, ['123', '45'])