mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-11-10 19:56:47 +03:00
23 lines
544 B
Python
23 lines
544 B
Python
from helper import unittest, PillowTestCase
|
|
|
|
from PIL import Image, GbrImagePlugin
|
|
|
|
|
|
class TestFileGbr(PillowTestCase):
|
|
|
|
def test_invalid_file(self):
|
|
invalid_file = "Tests/images/flower.jpg"
|
|
|
|
self.assertRaises(SyntaxError,
|
|
lambda: GbrImagePlugin.GbrImageFile(invalid_file))
|
|
|
|
def test_gbr_file(self):
|
|
im = Image.open('Tests/images/gbr.gbr')
|
|
|
|
target = Image.open('Tests/images/gbr.png')
|
|
|
|
self.assert_image_equal(target, im)
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|