summaryrefslogtreecommitdiff
path: root/numpy/testing
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2022-05-27 15:11:49 -0700
committerSebastian Berg <sebastian@sipsolutions.net>2022-06-15 11:42:02 -0700
commitffab4c45b3ad5264ff137b9f08490b6c986f9763 (patch)
tree30149f5e200b7e0bae353318209009a5543e874f /numpy/testing
parentc855cecce28d5f925c5b2e015a0bdfd1aa472590 (diff)
downloadnumpy-ffab4c45b3ad5264ff137b9f08490b6c986f9763.tar.gz
TST: Make test compatible with new promotion or mark for no-warnings
Diffstat (limited to 'numpy/testing')
-rw-r--r--numpy/testing/_private/utils.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/numpy/testing/_private/utils.py b/numpy/testing/_private/utils.py
index ca64446db..a4e80b026 100644
--- a/numpy/testing/_private/utils.py
+++ b/numpy/testing/_private/utils.py
@@ -36,6 +36,7 @@ __all__ = [
'SkipTest', 'KnownFailureException', 'temppath', 'tempdir', 'IS_PYPY',
'HAS_REFCOUNT', 'suppress_warnings', 'assert_array_compare',
'assert_no_gc_cycles', 'break_cycles', 'HAS_LAPACK64', 'IS_PYSTON',
+ 'OLD_PROMOTION'
]
@@ -52,6 +53,8 @@ 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
+OLD_PROMOTION = np.get_promotion_state() == 'legacy'
+
def import_nose():
""" Import nose only when needed.