Skip to content

Commit 698febd

Browse files
committed
test_gc: objects are no longer weak but strong
1 parent 3ba07ad commit 698febd

File tree

1 file changed

+9
-9
lines changed
  • graalpython/com.oracle.graal.python.test/src/tests/cpyext

1 file changed

+9
-9
lines changed

graalpython/com.oracle.graal.python.test/src/tests/cpyext/test_gc.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -510,10 +510,10 @@ def assert_is_freed(id): pass
510510
assert_is_alive(ID_OBJ14)
511511
assert_is_strong(htid_l2)
512512
assert_is_strong(htid_l3)
513-
assert_is_weak(htid_l)
514-
assert_is_weak(htid_l1)
515-
assert_is_weak(htid_l4)
516-
assert_is_weak(htid_d0)
513+
assert_is_strong(htid_l)
514+
assert_is_strong(htid_l1)
515+
assert_is_strong(htid_l4)
516+
assert_is_strong(htid_d0)
517517

518518
rescued_obj4 = l1[0]
519519
del l1
@@ -561,8 +561,8 @@ def assert_is_freed(id): pass
561561
assert_is_freed(ID_OBJ5)
562562
assert_is_freed(ID_OBJ12)
563563
assert_is_freed(ID_OBJ13)
564-
assert_is_weak(htid_l2)
565-
assert_is_weak(htid_l3)
564+
assert_is_strong(htid_l2)
565+
assert_is_strong(htid_l3)
566566

567567

568568
@skipIf(GRAALPY and not GRAALPY_NATIVE, "Python GC only used in native mode")
@@ -662,8 +662,8 @@ def assert_is_freed(id): pass
662662
self._trigger_gc()
663663
assert_is_freed(0)
664664
assert_is_freed(1)
665-
assert_is_weak(htid_l0)
666-
assert_is_weak(htid_l1)
665+
assert_is_strong(htid_l0)
666+
assert_is_strong(htid_l1)
667667

668668
def test_module_globals(self):
669669
self._trigger_gc()
@@ -787,7 +787,7 @@ def test_module_globals(self):
787787
PyObject *list_c = PyTuple_GET_ITEM(__pyx_args, 0);
788788
Py_INCREF(list_c);
789789
Py_DECREF(((struct struct_GC_Test_C *)self)->_test_list_c);
790-
printf("list_c: %p\\n", list_c);
790+
// printf("list_c: %p\\n", list_c);
791791
((struct struct_GC_Test_C *)self)->_test_list_c = list_c;
792792
return 0;
793793
}

0 commit comments

Comments
 (0)