transfer_test_4.py 423 B

1234567891011
  1. def testComputeEndByteNoChunks(self):
  2. total_size = 100
  3. download = transfer.Download.FromStream(
  4. six.StringIO(), chunksize=10, total_size=total_size)
  5. for end in (None, 1000):
  6. self.assertEqual(
  7. total_size - 1,
  8. download._Download__ComputeEndByte(0, end=end,
  9. use_chunks=False),
  10. msg='Failed on end={0}'.format(end))