diff --git a/Tests/test_file_xpm.py b/Tests/test_file_xpm.py index 7eef04676..16a811a4c 100644 --- a/Tests/test_file_xpm.py +++ b/Tests/test_file_xpm.py @@ -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