Rename bad variable name 'file' to 'TEST_FILE', remove unused 'data' variable

This commit is contained in:
hugovk 2014-07-17 23:23:50 +03:00
parent 8db043b35f
commit 14d1ac6389

View File

@ -3,14 +3,13 @@ from helper import unittest, PillowTestCase
from PIL import Image
# sample ppm stream
file = "Tests/images/lena.xpm"
data = open(file, "rb").read()
TEST_FILE = "Tests/images/lena.xpm"
class TestFileXpm(PillowTestCase):
def test_sanity(self):
im = Image.open(file)
im = Image.open(TEST_FILE)
im.load()
self.assertEqual(im.mode, "P")
self.assertEqual(im.size, (128, 128))
@ -18,7 +17,7 @@ class TestFileXpm(PillowTestCase):
def test_load_read(self):
# Arrange
im = Image.open(file)
im = Image.open(TEST_FILE)
dummy_bytes = 1
# Act