mirror of https://github.com/python/cpython.git
Fix test_capi.test_misc when run with -R:: (#107566)
Should fix the buildbot failures. This creates a new function each time that test is run, like Victor did for other tests.
This commit is contained in:
parent
0d30a5a409
commit
af8141cf87
|
@ -2464,6 +2464,8 @@ def testfunc(x):
|
||||||
|
|
||||||
def test_extended_arg(self):
|
def test_extended_arg(self):
|
||||||
"Check EXTENDED_ARG handling in superblock creation"
|
"Check EXTENDED_ARG handling in superblock creation"
|
||||||
|
ns = {}
|
||||||
|
exec(textwrap.dedent("""
|
||||||
def many_vars():
|
def many_vars():
|
||||||
# 260 vars, so z9 should have index 259
|
# 260 vars, so z9 should have index 259
|
||||||
a0 = a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = 42
|
a0 = a1 = a2 = a3 = a4 = a5 = a6 = a7 = a8 = a9 = 42
|
||||||
|
@ -2494,6 +2496,8 @@ def many_vars():
|
||||||
z0 = z1 = z2 = z3 = z4 = z5 = z6 = z7 = z8 = z9 = 42
|
z0 = z1 = z2 = z3 = z4 = z5 = z6 = z7 = z8 = z9 = 42
|
||||||
while z9 > 0:
|
while z9 > 0:
|
||||||
z9 = z9 - 1
|
z9 = z9 - 1
|
||||||
|
"""), ns, ns)
|
||||||
|
many_vars = ns["many_vars"]
|
||||||
|
|
||||||
opt = _testinternalcapi.get_uop_optimizer()
|
opt = _testinternalcapi.get_uop_optimizer()
|
||||||
with temporary_optimizer(opt):
|
with temporary_optimizer(opt):
|
||||||
|
|
Loading…
Reference in New Issue