Exemple #1
0
 def test_yib(self):
     self.assertEqual(sizeof_fmt(1024**8), '1YiB')
Exemple #2
0
 def test_str(self):
     self.assertEqual(sizeof_fmt('123'), '123B')
Exemple #3
0
 def test_num(self):
     self.assertEqual(sizeof_fmt(1024**2), '1MiB')
Exemple #4
0
 def test_none(self):
     self.assertEqual(sizeof_fmt(None), DEFAULT_UNKNOWN_SIZE)