Skip to content

Commit

Permalink
pythonGH-112383: Fix test_loop_quicken when an executor is installed (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
brandtbucher authored and aisk committed Feb 11, 2024
1 parent 2d06687 commit 7e0fcb8
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Lib/test/test_dis.py
Expand Up @@ -1210,8 +1210,13 @@ def test_loop_quicken(self):
got = self.get_disassembly(loop_test, adaptive=True)
expected = dis_loop_test_quickened_code
if _testinternalcapi.get_optimizer():
# We *may* see ENTER_EXECUTOR in the disassembly
got = got.replace("ENTER_EXECUTOR", "JUMP_BACKWARD ")
# We *may* see ENTER_EXECUTOR in the disassembly. This is a
# temporary hack to keep the test working until dis is able to
# handle the instruction correctly (GH-112383):
got = got.replace(
"ENTER_EXECUTOR 16",
"JUMP_BACKWARD 16 (to L1)",
)
self.do_disassembly_compare(got, expected)

@cpython_only
Expand Down

0 comments on commit 7e0fcb8

Please sign in to comment.