Skip to content

Commit

Permalink
Test bytesio object
Browse files Browse the repository at this point in the history
  • Loading branch information
wiredfool committed Sep 3, 2014
1 parent 8193566 commit e52152b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Tests/test_file_eps.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ def test_iobase_object(self):
with io.open(self.tempfile('temp_iobase.eps'), 'wb') as fh:
image1.save(fh, 'EPS')

def test_bytesio_object(self):
with open(file1, 'rb') as f:
img_bytes = io.BytesIO(f.read())

img = Image.open(img_bytes)
img.load()

image1_scale1_compare = Image.open(file1_compare).convert("RGB")
image1_scale1_compare.load()
self.assert_image_similar(img, image1_scale1_compare, 5)

def test_render_scale1(self):
# We need png support for these render test
codecs = dir(Image.core)
Expand Down

0 comments on commit e52152b

Please sign in to comment.