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