예제 #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