Skip to content

Commit

Permalink
gh-92886: make test_ast pass with -O (assertions off) (GH-98058)
Browse files Browse the repository at this point in the history
-O does not strip docstrings.

Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit 27ce45d)

Co-authored-by: Irit Katriel <[email protected]>
  • Loading branch information
miss-islington and iritkatriel authored Oct 8, 2022
1 parent 72a23d8 commit e493792
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 @@ -1076,7 +1076,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 e493792

Please sign in to comment.