Skip to content

Commit 87f3611

Browse files
committed
change to avoid failure about sturct size for float
1 parent fa8ee7f commit 87f3611

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Lib/test/test_sys.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1390,7 +1390,11 @@ class C(object): pass
13901390
# reverse
13911391
check(reversed(''), size('nP'))
13921392
# float
1393-
check(float(0), size('d'))
1393+
if sys.py2x_warning:
1394+
# plus 8 to reflect struct change for unsigned char ob_randomflag
1395+
check(float(0), size('d')+8)
1396+
else:
1397+
check(float(0), size('d')+8)
13941398
# sys.floatinfo
13951399
check(sys.float_info, vsize('') + self.P * len(sys.float_info))
13961400
# frame

0 commit comments

Comments
 (0)