python2 fixes. sigh.

This commit is contained in:
wiredfool 2013-10-01 00:05:55 +00:00
parent 2855449414
commit 05d0aa65f1

View File

@ -2,7 +2,6 @@ from tester import *
from PIL import Image
import struct
import math
try:
import site
@ -70,8 +69,8 @@ def test_3d_array():
def _test_img_equals_nparray(img, np):
assert_equal(img.size, np.shape[0:2])
px = img.load()
for x in range(0, img.size[0], math.floor(img.size[0]/10)):
for y in range(0, img.size[1], math.floor(img.size[1]/10)):
for x in range(0, img.size[0], int(img.size[0]/10)):
for y in range(0, img.size[1], int(img.size[1]/10)):
assert_deep_equal(px[x,y], np[y,x])