mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-03 21:24:31 +03:00
Rename bad variable name 'file' to 'TEST_FILE', remove unused 'data' variable
This commit is contained in:
parent
8db043b35f
commit
14d1ac6389
|
@ -3,14 +3,13 @@ from helper import unittest, PillowTestCase
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
|
|
||||||
# sample ppm stream
|
# sample ppm stream
|
||||||
file = "Tests/images/lena.xpm"
|
TEST_FILE = "Tests/images/lena.xpm"
|
||||||
data = open(file, "rb").read()
|
|
||||||
|
|
||||||
|
|
||||||
class TestFileXpm(PillowTestCase):
|
class TestFileXpm(PillowTestCase):
|
||||||
|
|
||||||
def test_sanity(self):
|
def test_sanity(self):
|
||||||
im = Image.open(file)
|
im = Image.open(TEST_FILE)
|
||||||
im.load()
|
im.load()
|
||||||
self.assertEqual(im.mode, "P")
|
self.assertEqual(im.mode, "P")
|
||||||
self.assertEqual(im.size, (128, 128))
|
self.assertEqual(im.size, (128, 128))
|
||||||
|
@ -18,7 +17,7 @@ class TestFileXpm(PillowTestCase):
|
||||||
|
|
||||||
def test_load_read(self):
|
def test_load_read(self):
|
||||||
# Arrange
|
# Arrange
|
||||||
im = Image.open(file)
|
im = Image.open(TEST_FILE)
|
||||||
dummy_bytes = 1
|
dummy_bytes = 1
|
||||||
|
|
||||||
# Act
|
# Act
|
||||||
|
|
Loading…
Reference in New Issue
Block a user