Skip to content

Commit b296087

Browse files
authored
Merge pull request numpy#26364 from ngoldbaum/fix-313-test
TST: static types are now immortal in the default build too
2 parents 4e6d2bf + d7ebf00 commit b296087

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

numpy/_core/tests/test_nditer.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
from numpy.testing import (
1212
assert_, assert_equal, assert_array_equal, assert_raises,
1313
IS_WASM, HAS_REFCOUNT, suppress_warnings, break_cycles,
14-
NOGIL_BUILD
1514
)
1615

1716
def iter_multi_index(i):
@@ -68,8 +67,8 @@ def test_iter_refcount():
6867
rc2_dt = sys.getrefcount(dt)
6968
it2 = it.copy()
7069
assert_(sys.getrefcount(a) > rc2_a)
71-
if not NOGIL_BUILD:
72-
# np.dtype('f4') is immortal in the nogil build
70+
if sys.version_info < (3, 13):
71+
# np.dtype('f4') is immortal after Python 3.13
7372
assert_(sys.getrefcount(dt) > rc2_dt)
7473
it = None
7574
assert_equal(sys.getrefcount(a), rc2_a)

0 commit comments

Comments
 (0)