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