Skip to content

Commit 1f2e5d6

Browse files
committed
tests: ignore large values for refcount too
Signed-off-by: Henry Schreiner <[email protected]>
1 parent e7a623e commit 1f2e5d6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_class.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -403,8 +403,9 @@ class PyDog(m.Dog):
403403
pytest.gc_collect()
404404
refcount_3 = refcount_immortal(cls)
405405

406+
# Python may report a large value here (above 30 bits), that's also fine
406407
assert refcount_1 == refcount_3
407-
assert (refcount_2 > refcount_1) or (refcount_2 == refcount_1 == UINT32MAX)
408+
assert (refcount_2 > refcount_1) or (refcount_2 == refcount_1 and refcount_1 >= 2**29)
408409

409410

410411
def test_reentrant_implicit_conversion_failure(msg):

0 commit comments

Comments
 (0)