Skip to content

Commit

Permalink
pythongh-92886: make test_ast pass with -O (assertions off) (pythonGH…
Browse files Browse the repository at this point in the history
…-98058)

-O does not strip docstrings.

Automerge-Triggered-By: GH:iritkatriel
  • Loading branch information
iritkatriel authored Oct 7, 2022
1 parent 45f2147 commit 27ce45d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lib/test/test_dis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ def get_disassembly(self, func, lasti=-1, wrapper=True, **kwargs):
return output.getvalue()


if sys.flags.optimize:
if dis.code_info.__doc__ is None:
code_info_consts = "0: None"
else:
code_info_consts = "0: 'Formatted details of methods, functions, or code.'"
Expand Down

0 comments on commit 27ce45d

Please sign in to comment.