diff options
author | Irit Katriel <1055913+iritkatriel@users.noreply.github.com> | 2022-10-07 23:30:23 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-07 23:30:23 (GMT) |
commit | 27ce45d8e105d0c9f9286c3cab830590d4c7cea3 (patch) | |
tree | 724e5b2530e4f1971cc518b3c4445979169723d0 | |
parent | 45f21472daad3934baf364c3100063ecc51c6e04 (diff) | |
download | cpython-27ce45d8e105d0c9f9286c3cab830590d4c7cea3.zip cpython-27ce45d8e105d0c9f9286c3cab830590d4c7cea3.tar.gz cpython-27ce45d8e105d0c9f9286c3cab830590d4c7cea3.tar.bz2 |
gh-92886: make test_ast pass with -O (assertions off) (GH-98058)
-O does not strip docstrings.
Automerge-Triggered-By: GH:iritkatriel
-rw-r--r-- | Lib/test/test_dis.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_dis.py b/Lib/test/test_dis.py index fc2862c..667b267 100644 --- a/Lib/test/test_dis.py +++ b/Lib/test/test_dis.py @@ -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.'" |