示例#1
0
 def test_more_than_one_megabyte(self):
     self.assertEqual(cr_text.convert_byte(8765434), '8.36 MB')
示例#2
0
 def test_more_than_one_kilobyte(self):
     self.assertEqual(cr_text.convert_byte(1500), '1.46 KB')
示例#3
0
 def test_one_terabyte(self):
     self.assertEqual(cr_text.convert_byte(1099511627776), '1.0 TB')
示例#4
0
 def test_one_byte(self):
     self.assertEqual(cr_text.convert_byte(1), '1.0 B')
示例#5
0
 def test_one_gigabyte(self):
     self.assertEqual(cr_text.convert_byte(1073741824), '1.0 GB')