summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compile.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r--Lib/test/test_compile.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 0965015..7ebe837 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -1008,6 +1008,16 @@ if 1:
elif instr.opname in HANDLED_JUMPS:
self.assertNotEqual(instr.arg, (line + 1)*INSTR_SIZE)
+ def test_no_wraparound_jump(self):
+ # See https://bugs.python.org/issue46724
+
+ def while_not_chained(a, b, c):
+ while not (a < b < c):
+ pass
+
+ for instr in dis.Bytecode(while_not_chained):
+ self.assertNotEqual(instr.opname, "EXTENDED_ARG")
+
@requires_debug_ranges()
class TestSourcePositions(unittest.TestCase):
# Ensure that compiled code snippets have correct line and column numbers