mirror of
https://github.com/python/cpython.git
synced 2024-11-27 20:04:41 +08:00
gh-92886: make test_ast pass with -O (assertions off) (GH-98058)
-O does not strip docstrings. Automerge-Triggered-By: GH:iritkatriel
This commit is contained in:
parent
45f21472da
commit
27ce45d8e1
@ -1212,7 +1212,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…
Reference in New Issue
Block a user