Skip to content

Commit

Permalink
PYTHON3.12 Reduce the number of iterations in memory leak test to avo…
Browse files Browse the repository at this point in the history
…id JIT triggering
  • Loading branch information
mcfletch committed Sep 29, 2024
1 parent d471586 commit db9f419
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_vbo_memusage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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...

0 comments on commit db9f419

Please sign in to comment.