From 4483dfbcb9e10ad25ba24a8bc2ff59bebabd542f Mon Sep 17 00:00:00 2001 From: wiredfool Date: Tue, 7 Mar 2017 02:36:58 -0800 Subject: [PATCH] py3, pep8 --- Tests/test_file_gif.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Tests/test_file_gif.py b/Tests/test_file_gif.py index 05a28995c..9bbaa4974 100644 --- a/Tests/test_file_gif.py +++ b/Tests/test_file_gif.py @@ -508,9 +508,9 @@ class TestFileGif(PillowTestCase): def test_getdata(self): # test getheader/getdata against legacy values # Create a 'P' image with holes in the palette - im = Image._wedge().resize((16,16)) + im = Image._wedge().resize((16, 16)) im.putpalette(ImagePalette.ImagePalette('RGB')) - im.info = {'background':0} + im.info = {'background': 0} passed_palette = bytes(bytearray([255-i//3 for i in range(768)])) @@ -519,12 +519,12 @@ class TestFileGif(PillowTestCase): h = GifImagePlugin.getheader(im, passed_palette) d = GifImagePlugin.getdata(im) - import cPickle as pickle + import pickle # Enable to get target values on pre-refactor version - # with open('Tests/images/gif_header_data.pkl', 'wb') as f: - # f.write(pickle.dumps((h,d))) + #with open('Tests/images/gif_header_data.pkl', 'wb') as f: + # pickle.dump((h, d), f, 1) with open('Tests/images/gif_header_data.pkl', 'rb') as f: - (h_target,d_target) = pickle.loads(f.read()) + (h_target, d_target) = pickle.load(f) self.assertEqual(h, h_target) self.assertEqual(d, d_target)