File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 12
12
import sysconfig
13
13
import test .support
14
14
from test import support
15
- from test .support import os_helper
15
+ from test .support import os_helper , Py_GIL_DISABLED
16
16
from test .support .script_helper import assert_python_ok , assert_python_failure
17
17
from test .support import threading_helper
18
18
from test .support import import_helper
@@ -1707,11 +1707,15 @@ class newstyleclass(object): pass
1707
1707
# TODO: add check that forces layout of unicodefields
1708
1708
# weakref
1709
1709
import weakref
1710
- check (weakref .ref (int ), size ('2Pn3P' ))
1710
+ if Py_GIL_DISABLED :
1711
+ expected_size = size ('2Pn4P' )
1712
+ else :
1713
+ expected_size = size ('2Pn3P' )
1714
+ check (weakref .ref (int ), expected_size )
1711
1715
# weakproxy
1712
1716
# XXX
1713
1717
# weakcallableproxy
1714
- check (weakref .proxy (int ), size ( '2Pn3P' ) )
1718
+ check (weakref .proxy (int ), expected_size )
1715
1719
1716
1720
def check_slots (self , obj , base , extra ):
1717
1721
expected = sys .getsizeof (base ) + struct .calcsize (extra )
You can’t perform that action at this time.
0 commit comments