From db9f419d26e265deb8ed74d083ecd57d27ff1ce9 Mon Sep 17 00:00:00 2001 From: "Mike C. Fletcher" Date: Sun, 29 Sep 2024 16:14:57 -0400 Subject: [PATCH] PYTHON3.12 Reduce the number of iterations in memory leak test to avoid JIT triggering --- tests/test_vbo_memusage.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/test_vbo_memusage.py b/tests/test_vbo_memusage.py index 7a2e4286..8487f71f 100644 --- a/tests/test_vbo_memusage.py +++ b/tests/test_vbo_memusage.py @@ -34,7 +34,7 @@ def test_sf_2980896(): """Test SF#2980896 report of memory leak on VBO transfer""" data = arrays.GLfloatArray.zeros((1000,)) memory = get_current_memory() - for i in range(100): + for i in range(8): new_vbo = vbo.VBO(data) with new_vbo: # data is transferred to the VBO @@ -48,7 +48,8 @@ def test_sf_2980896(): memory = get_current_memory() else: current = get_current_memory() - assert current - memory < 200, ( - """Shouldn't have any (or at least much) extra RAM allocated, lost: %s""" - % (current - memory) + delta = current - memory + assert delta < 200, ( + """Shouldn't have any (or at least much) extra RAM allocated, lost: %s on iteration %d""" + % (current - memory, i) ) # fails only when run in the whole suite...