From 1e718c3d864c983cc2fc15a117869496809f1b05 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sat, 18 Feb 2023 00:50:18 +0100 Subject: [PATCH] Rectified previous patch --- testdata/python/layPixelBuffer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/testdata/python/layPixelBuffer.py b/testdata/python/layPixelBuffer.py index 9806395a4..b9cba810e 100644 --- a/testdata/python/layPixelBuffer.py +++ b/testdata/python/layPixelBuffer.py @@ -23,11 +23,11 @@ import sys def compare(pb1, pb2): - if pb1.width != pb2.width or pb1.height != pb2.height: + if pb1.width() != pb2.width() or pb1.height() != pb2.height(): return False - for x in range(0, pb1.width): - for y in range(0, pb1.height): + for x in range(0, pb1.width()): + for y in range(0, pb1.height()): if pb1.pixel(x, y) != pb2.pixel(x, y): return False @@ -55,7 +55,7 @@ class LAYPixelBufferTests(unittest.TestCase): pb.write_png(tmp) pb_copy = pya.PixelBuffer.read_png(tmp) - self.assertEqual(pb, pb_copy) + self.assertEqual(compare(pb, pb_copy), True) # run unit tests