summaryrefslogtreecommitdiff
path: root/tests/runtests.py
diff options
context:
space:
mode:
authorNick Pope <nick@nickpope.me.uk>2023-11-21 15:11:09 +0000
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-11-27 10:37:29 +0100
commit9baaf89eed42f9e747c774bc79543f47ea9697f8 (patch)
tree0a66089e01243075f358ce08b8599294c9e81f4c /tests/runtests.py
parent174369a990c00d75cf40e0a06ab82bec9a89a7ef (diff)
Refs #34986 -- Added django.utils.version.PYPY.
Diffstat (limited to 'tests/runtests.py')
-rwxr-xr-xtests/runtests.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/runtests.py b/tests/runtests.py
index 48beb1a3d7..1e3d15591f 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -30,7 +30,7 @@ else:
from django.test.utils import NullTimeKeeper, TimeKeeper, get_runner
from django.utils.deprecation import RemovedInDjango60Warning
from django.utils.log import DEFAULT_LOGGING
- from django.utils.version import PY312
+ from django.utils.version import PY312, PYPY
try:
import MySQLdb
@@ -52,7 +52,7 @@ 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.
-if not hasattr(sys, "pypy_version_info"):
+if not PYPY:
gc.set_threshold(100_000)
RUNTESTS_DIR = os.path.abspath(os.path.dirname(__file__))