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