示例#1
0
 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
示例#2
0
 def test_byte_size_yotta(self):
     size = 3 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024 * 1024
     self.assertEqual('3.0YB', curator.byte_size(size))
示例#3
0
 def test_byte_size_yotta(self):
     size = 3*1024*1024*1024*1024*1024*1024*1024*1024
     self.assertEqual('3.0YB', curator.byte_size(size))
示例#4
0
 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