summaryrefslogtreecommitdiff
path: root/numpy/testing/_private/utils.py
diff options
context:
space:
mode:
authorslepton <slepton@posteo.de>2021-07-07 08:27:49 +0200
committerslepton <slepton@posteo.de>2021-07-07 08:29:33 +0200
commit4cc9ef18a6eff5cd46bae4af615de64cdcb3fd37 (patch)
treee4c47b65c402925c87137cafcc18e4cb18f5df0a /numpy/testing/_private/utils.py
parentf5fcd004956c7c6a7699d73a9fd687f145f7cc29 (diff)
downloadnumpy-4cc9ef18a6eff5cd46bae4af615de64cdcb3fd37.tar.gz
For Pyston the refcount of "immortal" objects is set to ~infinity
Diffstat (limited to 'numpy/testing/_private/utils.py')
-rw-r--r--numpy/testing/_private/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/testing/_private/utils.py b/numpy/testing/_private/utils.py
index 487aa0b4c..77ca4ef85 100644
--- a/numpy/testing/_private/utils.py
+++ b/numpy/testing/_private/utils.py
@@ -48,7 +48,8 @@ KnownFailureTest = KnownFailureException # backwards compat
verbose = 0
IS_PYPY = platform.python_implementation() == 'PyPy'
-HAS_REFCOUNT = getattr(sys, 'getrefcount', None) is not None
+IS_PYSTON = hasattr(sys, "pyston_version_info")
+HAS_REFCOUNT = getattr(sys, 'getrefcount', None) is not None and not IS_PYSTON
HAS_LAPACK64 = numpy.linalg.lapack_lite._ilp64