Debian Codegraph @

rpython/rlib/test/test_rweakref.py

raw symbols SCIP
1 from rpython.rlib.rweakref import has_weakref_support
2 from rpython.rtyper.test.test_llinterp import interpret
3
4
5 def test_has_weakref_support():
6 assert has_weakref_support()
7
8 res = interpret(lambda: has_weakref_support(), [],
9 **{'translation.rweakref': True})
10 assert res == True
11
12 res = interpret(lambda: has_weakref_support(), [],
13 **{'translation.rweakref': False})
14 assert res == False