Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Increase threshold on memleak test
  • Loading branch information
filmor committed Mar 19, 2026
commit b71135e348f7c97fe48e0833634c59b6f98591f6
5 changes: 3 additions & 2 deletions tests/test_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -967,8 +967,9 @@ def test_getting_generic_method_binding_does_not_leak_memory():
bytesAllocatedPerIteration = pow(2, 20) # 1MB
bytesLeakedPerIteration = processBytesDelta / iterations

# Allow 50% threshold - this shows the original issue is fixed, which leaks the full allocated bytes per iteration
failThresholdBytesLeakedPerIteration = bytesAllocatedPerIteration / 2
# Allow 75% threshold - this shows the original issue is fixed, which leaks the full allocated bytes per iteration
# Increased from 50% to ensure that it works on Windows with Python >3.13
failThresholdBytesLeakedPerIteration = bytesAllocatedPerIteration * 0.75

assert bytesLeakedPerIteration < failThresholdBytesLeakedPerIteration

Expand Down
Loading