Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
picnixz committed Dec 28, 2024
1 parent 602f97c commit 68a33f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib/test/test_embed.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,12 @@ def test_simple_initialization_api(self):
@support.requires_specialization
def test_specialized_static_code_gets_unspecialized_at_Py_FINALIZE(self):
# https://github.com/python/cpython/issues/92031
from test.test_dis import ADAPTIVE_WARMUP_DELAY

code = textwrap.dedent("""\
code = textwrap.dedent(f"""\
import dis
import importlib._bootstrap
import opcode
import test.test_dis
def is_specialized(f):
for instruction in dis.get_instructions(f, adaptive=True):
Expand All @@ -373,7 +373,7 @@ def is_specialized(f):
assert not is_specialized(func), "specialized instructions found"
for i in range(test.test_dis.ADAPTIVE_WARMUP_DELAY):
for i in range({ADAPTIVE_WARMUP_DELAY}):
func(importlib._bootstrap, ["x"], lambda *args: None)
assert is_specialized(func), "no specialized instructions found"
Expand Down

0 comments on commit 68a33f3

Please sign in to comment.