summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_compiler_assemble.py
diff options
context:
space:
mode:
authorXuanteng Huang <44627253+xuantengh@users.noreply.github.com>2024-10-30 09:01:09 (GMT)
committerGitHub <noreply@github.com>2024-10-30 09:01:09 (GMT)
commit35df4eb959b3923c08aaaeff728c5ed1706f31cf (patch)
tree0066d2a27b47aaa3fc3dde9debcfd9b553579565 /Lib/test/test_compiler_assemble.py
parent2ab377a47c8290f8bf52c8ffb5d7fc4c45452611 (diff)
downloadcpython-35df4eb959b3923c08aaaeff728c5ed1706f31cf.zip
cpython-35df4eb959b3923c08aaaeff728c5ed1706f31cf.tar.gz
cpython-35df4eb959b3923c08aaaeff728c5ed1706f31cf.tar.bz2
gh-126072: do not add `None` to `co_consts` if there is no docstring (GH-126101)
Diffstat (limited to 'Lib/test/test_compiler_assemble.py')
-rw-r--r--Lib/test/test_compiler_assemble.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_compiler_assemble.py b/Lib/test/test_compiler_assemble.py
index 625d3c7..c4962e3 100644
--- a/Lib/test/test_compiler_assemble.py
+++ b/Lib/test/test_compiler_assemble.py
@@ -84,7 +84,7 @@ class IsolatedAssembleTests(AssemblerTestCase):
return x
return inner() % 2
- inner_code = mod_two.__code__.co_consts[1]
+ inner_code = mod_two.__code__.co_consts[0]
assert isinstance(inner_code, types.CodeType)
metadata = {