Skip to content

Commit fb5b85f

Browse files
committed
avoid unsupported sys.getrefcount in unittests
1 parent c4be74a commit fb5b85f

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

graalpython/lib-python/3/ctypes/test/test_internals.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# This tests the internal _objects attribute
22
import unittest
33
from ctypes import *
4-
from sys import getrefcount as grc
4+
try:
5+
from sys import getrefcount as grc
6+
except:
7+
pass # Truffle change
58

69
# XXX This test must be reviewed for correctness!!!
710

graalpython/lib-python/3/ctypes/test/test_python_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99

1010
################################################################
1111

12-
from sys import getrefcount as grc
12+
try:
13+
from sys import getrefcount as grc
14+
except:
15+
pass # Truffle change
1316
if sys.version_info > (2, 4):
1417
c_py_ssize_t = c_size_t
1518
else:

0 commit comments

Comments
 (0)