summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArmin Rigo <arigo@tunes.org>2023-01-09 15:31:42 +0100
committerArmin Rigo <arigo@tunes.org>2023-01-09 15:31:42 +0100
commit5bc61e0b7b191432c9f5bfb8139378c0d9ac8061 (patch)
tree656c29a88fdebb7047b93883c00fe1671452b29d
parentce7d85d713215f2c97c32c81f50753f290fbe977 (diff)
downloadcffi-5bc61e0b7b191432c9f5bfb8139378c0d9ac8061.tar.gz
Issue 556
Trying to make this test a little bit less fragile
-rw-r--r--testing/cffi1/test_ffi_obj.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/testing/cffi1/test_ffi_obj.py b/testing/cffi1/test_ffi_obj.py
index 9085fb8..9b1532b 100644
--- a/testing/cffi1/test_ffi_obj.py
+++ b/testing/cffi1/test_ffi_obj.py
@@ -342,9 +342,9 @@ def test_ffi_new_allocator_1():
ffi = _cffi1_backend.FFI()
alloc1 = ffi.new_allocator()
alloc2 = ffi.new_allocator(should_clear_after_alloc=False)
- for retry in range(100):
+ for retry in range(400):
p1 = alloc1("int[10]")
- p2 = alloc2("int[10]")
+ p2 = alloc2("int[]", 10 + retry * 13)
combination = 0
for i in range(10):
assert p1[i] == 0
@@ -353,8 +353,6 @@ def test_ffi_new_allocator_1():
p2[i] = -43
if combination != 0:
break
- del p1, p2
- import gc; gc.collect()
else:
raise AssertionError("cannot seem to get an int[10] not "
"completely cleared")