Skip to content

Commit a8a0636

Browse files
committed
pythongh-92886: make test_ast pass with -O (assertions off)
1 parent be4099e commit a8a0636

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_dis.py

+1-1
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)