def testComputeEndByteNoTotal(self): download = transfer.Download.FromStream(six.StringIO()) default_chunksize = download.chunksize for chunksize in (100, default_chunksize): download.chunksize = chunksize for start in (0, 10): self.assertEqual( download.chunksize + start - 1, download._Download__ComputeEndByte(start), msg='Failed on start={0}, chunksize={1}'.format( start, chunksize))