Esempio n. 1
0
 def test_hbytes_TB(self):
     testnumber = 1024.0 ** 4 + 5
     result = hbytes(testnumber)
     self.assertEqual(result, '1.0 TB')
Esempio n. 2
0
 def test_hbytes_GB(self):
     testnumber = 1024.0 ** 3 + 5
     result = hbytes(testnumber)
     self.assertEqual(result, '1.0 GB')
Esempio n. 3
0
 def test_hbytes_KB(self):
     testnumber = 1024.0 + 5
     result = hbytes(testnumber)
     self.assertEqual(result, '1.0 KB')
Esempio n. 4
0
 def test_hbytes_MB(self):
     testnumber = 1024.0 ** 2 + 5
     result = hbytes(testnumber)
     self.assertEqual(result, '1.0 MB')
Esempio n. 5
0
 def test_hbytes(self):
     testnumber = 5
     result = hbytes(testnumber)
     self.assertEqual(result, '5.0 bytes')