def test_format_bytes(self):
    self.assertEqual(format_bytes(0), '0.00B')
    self.assertEqual(format_bytes(1000), '1000.00B')
    self.assertEqual(format_bytes(1024), '1.00KiB')
    self.assertEqual(format_bytes((1024 ** 2)), '1.00MiB')
    self.assertEqual(format_bytes((1024 ** 3)), '1.00GiB')
    self.assertEqual(format_bytes((1024 ** 4)), '1.00TiB')
    self.assertEqual(format_bytes((1024 ** 5)), '1.00PiB')
    self.assertEqual(format_bytes((1024 ** 6)), '1.00EiB')
    self.assertEqual(format_bytes((1024 ** 7)), '1.00ZiB')
    self.assertEqual(format_bytes((1024 ** 8)), '1.00YiB')
    self.assertEqual(format_bytes((1024 ** 9)), '1024.00YiB')
def test_format_bytes(self):
    self.assertEqual(format_bytes(0), '0.00B')
    self.assertEqual(format_bytes(1000), '1000.00B')
    self.assertEqual(format_bytes(1024), '1.00KiB')
    self.assertEqual(format_bytes((1024 ** 2)), '1.00MiB')
    self.assertEqual(format_bytes((1024 ** 3)), '1.00GiB')
    self.assertEqual(format_bytes((1024 ** 4)), '1.00TiB')
    self.assertEqual(format_bytes((1024 ** 5)), '1.00PiB')
    self.assertEqual(format_bytes((1024 ** 6)), '1.00EiB')
    self.assertEqual(format_bytes((1024 ** 7)), '1.00ZiB')
    self.assertEqual(format_bytes((1024 ** 8)), '1.00YiB')
    self.assertEqual(format_bytes((1024 ** 9)), '1024.00YiB')