コード例 #1
0
 def test_tb(self):
     self.assertEqual(1000000000000, crhumanize.dehumanize_readable_filesize('1.00TB'))
     self.assertEqual(55560000000000, crhumanize.dehumanize_readable_filesize('55.56TB'))
コード例 #2
0
 def test_kb(self):
     self.assertEqual(1000, crhumanize.dehumanize_readable_filesize('1KB'))
     self.assertEqual(999000, crhumanize.dehumanize_readable_filesize('999KB'))
コード例 #3
0
 def test_mb(self):
     self.assertEqual(1000000, crhumanize.dehumanize_readable_filesize('1.0MB'))
     self.assertEqual(55600000, crhumanize.dehumanize_readable_filesize('55.6MB'))
コード例 #4
0
 def test_less_than_kb(self):
     self.assertEqual(0, crhumanize.dehumanize_readable_filesize('0B'))
     self.assertEqual(999, crhumanize.dehumanize_readable_filesize('999B'))