mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 09:44:31 +03:00
Replace lena.tar with hopper.tar
This commit is contained in:
parent
06a2378f52
commit
14ac9ce59c
BIN
Tests/images/hopper.tar
Normal file
BIN
Tests/images/hopper.tar
Normal file
Binary file not shown.
Binary file not shown.
|
@ -4,8 +4,8 @@ from PIL import Image, TarIO
|
||||||
|
|
||||||
codecs = dir(Image.core)
|
codecs = dir(Image.core)
|
||||||
|
|
||||||
# sample ppm stream
|
# Sample tar archive
|
||||||
tarfile = "Tests/images/lena.tar"
|
TEST_TAR_FILE = "Tests/images/hopper.tar"
|
||||||
|
|
||||||
|
|
||||||
class TestFileTar(PillowTestCase):
|
class TestFileTar(PillowTestCase):
|
||||||
|
@ -16,7 +16,7 @@ class TestFileTar(PillowTestCase):
|
||||||
|
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
if "zip_decoder" in codecs:
|
if "zip_decoder" in codecs:
|
||||||
tar = TarIO.TarIO(tarfile, 'lena.png')
|
tar = TarIO.TarIO(TEST_TAR_FILE, 'hopper.png')
|
||||||
im = Image.open(tar)
|
im = Image.open(tar)
|
||||||
im.load()
|
im.load()
|
||||||
self.assertEqual(im.mode, "RGB")
|
self.assertEqual(im.mode, "RGB")
|
||||||
|
@ -24,7 +24,7 @@ class TestFileTar(PillowTestCase):
|
||||||
self.assertEqual(im.format, "PNG")
|
self.assertEqual(im.format, "PNG")
|
||||||
|
|
||||||
if "jpeg_decoder" in codecs:
|
if "jpeg_decoder" in codecs:
|
||||||
tar = TarIO.TarIO(tarfile, 'lena.jpg')
|
tar = TarIO.TarIO(TEST_TAR_FILE, 'hopper.jpg')
|
||||||
im = Image.open(tar)
|
im = Image.open(tar)
|
||||||
im.load()
|
im.load()
|
||||||
self.assertEqual(im.mode, "RGB")
|
self.assertEqual(im.mode, "RGB")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user