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