aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_code.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-10-29 11:15:42 +0000
committerGitHub <noreply@github.com>2024-10-29 11:15:42 +0000
commitfaa3272fb8d63d481a136cc0467a0cba6ed7b264 (patch)
tree474ac9edbff637a8edb280846a1d3d9b113915c4 /Lib/test/test_code.py
parent67f5c5bd6fcc956a785edef3be67e8cbe470cd31 (diff)
downloadcpython-faa3272fb8d63d481a136cc0467a0cba6ed7b264.tar.gz
cpython-faa3272fb8d63d481a136cc0467a0cba6ed7b264.zip
GH-125837: Split `LOAD_CONST` into three. (GH-125972)
* Add LOAD_CONST_IMMORTAL opcode * Add LOAD_SMALL_INT opcode * Remove RETURN_CONST opcode
Diffstat (limited to 'Lib/test/test_code.py')
-rw-r--r--Lib/test/test_code.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_code.py b/Lib/test/test_code.py
index 93f3a5833cb..dcdd15a43e6 100644
--- a/Lib/test/test_code.py
+++ b/Lib/test/test_code.py
@@ -254,10 +254,11 @@ class CodeTest(unittest.TestCase):
return x
code = func.__code__
- # different co_name, co_varnames, co_consts
+ # Different co_name, co_varnames, co_consts.
+ # Must have the same number of constants and
+ # variables or we get crashes.
def func2():
y = 2
- z = 3
return y
code2 = func2.__code__