def test_peek_format(self, format, expected_format): buf = BytesIO() Image.new("RGB", (100, 100)).save(buf, format) assert peek_image_format(buf) == expected_format
def check(self, format, expected_format): buf = BytesIO() Image.new('RGB', (100, 100)).save(buf, format) eq_(peek_image_format(buf), expected_format)