mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
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 27ce45d8e1
)
Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
This commit is contained in:
parent
72a23d8f06
commit
e493792612
1 changed files with 1 additions and 1 deletions
|
@ -1076,7 +1076,7 @@ class DisWithFileTests(DisTests):
|
|||
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.'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue