A community-maintained Python framework for creating mathematical animations.
Reorder red/green layers in the graphical unit test (#1299)
Mark Miller99de10f61d23
diff --git a/tests/utils/GraphicalUnitTester.py b/tests/utils/GraphicalUnitTester.pyindex 2a9b8a865..685823dd6 100644--- a/tests/utils/GraphicalUnitTester.py+++ b/tests/utils/GraphicalUnitTester.py@@ -102,16 +102,16 @@ class GraphicalUnitTester:diff_im = expected_frame_data.copy()diff_im = np.where(frame_data != np.array([0, 0, 0, 255]),- np.array([255, 0, 0, 255], dtype="uint8"),+ np.array([0, 255, 0, 255], dtype="uint8"),np.array([0, 0, 0, 255], dtype="uint8"),- ) # Set the points of the frame generated to red.+ ) # Set any non-black pixels to greennp.putmask(diff_im,- expected_frame_data != np.array([0, 0, 0, 255], dtype="uint8"),- np.array([0, 255, 0, 255], dtype="uint8"),- ) # Set the points of the frame generated to green.+ expected_frame_data != frame_data,+ np.array([255, 0, 0, 255], dtype="uint8"),+ ) # Set any different pixels to redax.imshow(diff_im, interpolation="nearest")- ax.set_title("Differences summary : (red = got, green = expected)")+ ax.set_title("Differences summary : (green = same, red = different)")plt.show()plt.savefig(f"{self.scene}.png")