Skip to content

Commit 24b127f

Browse files
fix failing tests
1 parent df20f69 commit 24b127f

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

Lib/test/test_sys.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1546,14 +1546,11 @@ class C(object): pass
15461546
check(float(0), size('d'))
15471547
# sys.floatinfo
15481548
check(sys.float_info, vsize('') + self.P * len(sys.float_info))
1549-
# Note: this test doesn't work with tier 2 optimizers even if the test itself
1550-
# disables the optimizer. With function inlining, stacks can grow to arbtirary length,
1551-
# and thus a grown frame will not have the expected size.
15521549
# frame
1553-
# def func():
1554-
# return sys._getframe()
1555-
# x = func()
1556-
# check(x, size('3Pi3c7P2ic??2P'))
1550+
def func():
1551+
return sys._getframe()
1552+
x = func()
1553+
check(x, size('3Pi3c7P4ic??2P'))
15571554
# function
15581555
def func(): pass
15591556
check(func, size('15Pi'))
@@ -1568,10 +1565,9 @@ def bar(cls):
15681565
check(foo, size('PP'))
15691566
# classmethod
15701567
check(bar, size('PP'))
1571-
# This test also doesn't work with the optimizer, see above.
15721568
# generator
1573-
# def get_gen(): yield 1
1574-
# check(get_gen(), size('PP4P4c7P2ic??2P'))
1569+
def get_gen(): yield 1
1570+
check(get_gen(), size('PP4P4c7P4ic??2P'))
15751571
# iterator
15761572
check(iter('abc'), size('lP'))
15771573
# callable-iterator

0 commit comments

Comments
 (0)