Skip to content

Commit 0a6cd88

Browse files
authored
Test drawing lazy sprite list (#2168)
1 parent 0f2cffc commit 0a6cd88

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/unit/sprite/test_sprite_render.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77
SPRITE_TEXTURE_GOLD_COIN = arcade.load_texture(":resources:images/items/coinGold.png")
88

99

10+
def test_draw_lazy_spritelist(window: arcade.Window):
11+
"""Test that a lazy sprite list is drawn correctly"""
12+
sprite = arcade.Sprite(SPRITE_TEXTURE_GOLD_COIN)
13+
sprite_list = arcade.SpriteList(lazy=True)
14+
sprite_list.append(sprite)
15+
# Should not crash
16+
sprite_list.draw()
17+
18+
1019
def test_render_simple(window):
1120
"""Simple sprite rendering test"""
1221
window.background_color = arcade.color.AMAZON

0 commit comments

Comments
 (0)