diff options
author | Armin Rigo <arigo@tunes.org> | 2023-01-09 15:31:42 +0100 |
---|---|---|
committer | Armin Rigo <arigo@tunes.org> | 2023-01-09 15:31:42 +0100 |
commit | 5bc61e0b7b191432c9f5bfb8139378c0d9ac8061 (patch) | |
tree | 656c29a88fdebb7047b93883c00fe1671452b29d | |
parent | ce7d85d713215f2c97c32c81f50753f290fbe977 (diff) | |
download | cffi-5bc61e0b7b191432c9f5bfb8139378c0d9ac8061.tar.gz |
Issue 556
Trying to make this test a little bit less fragile
-rw-r--r-- | testing/cffi1/test_ffi_obj.py | 6 |
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") |