8000 [3.10] gh-92886: make test_ast pass with -O (assertions off) (GH-98058) by miss-islington · Pull Request #98076 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

[3.10] gh-92886: make test_ast pass with -O (assertions off) (GH-98058) #98076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
gh-92886: make test_ast pass with -O (assertions off) (GH-98058)
-O does not strip docstrings.

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

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
  • Loading branch information
iritkatriel authored and miss-islington committed Oct 7, 2022
commit 631f4e980c06ed9b51b46b2c89fb146f34579140
2 changes: 1 addition & 1 deletion Lib/test/test_dis.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,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