diff options
| author | Michał Górny <mgorny@gentoo.org> | 2023-11-20 21:02:28 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2023-11-21 08:07:16 +0100 |
| commit | 09b4a4e2c1d2e3c6dbf1d963095deeab86e0525d (patch) | |
| tree | 1cd22711eda9f19fe1243c43681d516e83d003f4 /tests/runtests.py | |
| parent | 6af83d2ee631afaec8bb018b81b2eba62a0524c2 (diff) | |
Fixed runtests.py crash on PyPy.
The gc.set_threshold() call was made conditional to non-PyPy
implementations. The method is not available in PyPy3, and GC is much
less aggressive there, so the adjustment probably is not necessary.
Diffstat (limited to 'tests/runtests.py')
| -rwxr-xr-x | tests/runtests.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/runtests.py b/tests/runtests.py index e03966410b..48beb1a3d7 100755 --- a/tests/runtests.py +++ b/tests/runtests.py @@ -52,7 +52,8 @@ warnings.simplefilter("error", RuntimeWarning) # references, which are a minority, so the garbage collection threshold can be # larger than the default threshold of 700 allocations + deallocations without # much increase in memory usage. -gc.set_threshold(100_000) +if not hasattr(sys, "pypy_version_info"): + gc.set_threshold(100_000) RUNTESTS_DIR = os.path.abspath(os.path.dirname(__file__)) |
