def test_byte_size(self): size = 3 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 unit = ['Z', 'E', 'P', 'T', 'G', 'M', 'K', ''] for i in range(0, 7): self.assertEqual('3.0{0}B'.format(unit[i]), curator.byte_size(size)) size /= 1024
def test_byte_size_yotta(self): size = 3 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 self.assertEqual('3.0YB', curator.byte_size(size))
def test_byte_size_yotta(self): size = 3*1024*1024*1024*1024*1024*1024*1024*1024 self.assertEqual('3.0YB', curator.byte_size(size))
def test_byte_size(self): size = 3*1024*1024*1024*1024*1024*1024*1024 unit = ['Z','E','P','T','G','M','K',''] for i in range(0,7): self.assertEqual('3.0{0}B'.format(unit[i]), curator.byte_size(size)) size /= 1024