From bcb2a41aa00393d2c9f472642fc763709b2da721 Mon Sep 17 00:00:00 2001 From: "Yi Yang @ Aquamarine" Date: Wed, 13 Nov 2024 17:28:10 +0800 Subject: [PATCH] (agrf) Add unit test --- agrf/lib/building/layout_test.py | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 agrf/lib/building/layout_test.py diff --git a/agrf/lib/building/layout_test.py b/agrf/lib/building/layout_test.py new file mode 100644 index 00000000..6937cc16 --- /dev/null +++ b/agrf/lib/building/layout_test.py @@ -0,0 +1,9 @@ +from agrf.lib.building.layout import ADefaultGroundSprite + + +def test_default_groundsprite(): + gs1012 = ADefaultGroundSprite(1012) + + graphics = gs1012.graphics(4, 32).to_image() + assert graphics.shape == (127, 256, 4) + assert graphics[64, 128, 1] == 67