From 32248dbd56d54813771ef946eb7da56a1733a826 Mon Sep 17 00:00:00 2001 From: Einar Forselv Date: Wed, 21 Jul 2021 19:06:27 +0200 Subject: [PATCH] Texture: Verify physical texture size after resize --- tests/unit2/test_opengl_texture.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit2/test_opengl_texture.py b/tests/unit2/test_opengl_texture.py index 945abbd5f..75b092cbd 100644 --- a/tests/unit2/test_opengl_texture.py +++ b/tests/unit2/test_opengl_texture.py @@ -181,5 +181,8 @@ def test_byte_size(ctx): def test_resize(ctx): tex = ctx.texture((100, 100), components=4) assert tex.size == (100, 100) + assert len(tex.read()) == 100 * 100 * 4 + tex.resize((200, 200)) assert tex.size == (200, 200) + assert len(tex.read()) == 200 * 200 * 4