8000 gh-92886: make test_ast pass with -O (assertions off) (GH-98058) · python/cpython@27ce45d · GitHub
[go: up one dir, main page]

Skip to content

Commit 27ce45d

Browse files
authored
gh-92886: make test_ast pass with -O (assertions off) (GH-98058)
-O does not strip docstrings. Automerge-Triggered-By: GH:iritkatriel
1 parent 45f2147 commit 27ce45d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_dis.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1212,7 +1212,7 @@ def get_disassembly(self, func, lasti=-1, wrapper=True, **kwargs):
12121212
return output.getvalue()
12131213

12141214

1215-
if sys.flags.optimize:
1215+
if dis.code_info.__doc__ is None:
12161216
code_info_consts = "0: None"
12171217
else:
12181218
code_info_consts = "0: 'Formatted details of methods, functions, or code.'"

0 commit comments

Comments
 (0)
0