]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-112383: Fix test_loop_quicken when an executor is installed (GH-113153)
authorBrandt Bucher <brandtbucher@microsoft.com>
Fri, 15 Dec 2023 17:27:57 +0000 (09:27 -0800)
committerGitHub <noreply@github.com>
Fri, 15 Dec 2023 17:27:57 +0000 (17:27 +0000)
Lib/test/test_dis.py

index 0c7fd60f640854d395741c1a747fa381ab33c56d..e4c7e9ba4649f7aec18e871c6415b6692adc3e2e 100644 (file)
@@ -1210,8 +1210,13 @@ class DisTests(DisTestBase):
         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