]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-136438: Make sure `test_ast` pass with all optimization levels (#136596)
authorMikhail Efimov <efimov.mikhail@gmail.com>
Fri, 18 Jul 2025 16:07:46 +0000 (19:07 +0300)
committerGitHub <noreply@github.com>
Fri, 18 Jul 2025 16:07:46 +0000 (19:07 +0300)
commit03017a8cc2242d881a3042b1eb9084c9bae9f85d
treef62751312ecc68e72f6afb2fe48b8d225aa6cfa5
parent28937d3a21cf8168c853ae43374a8287c21f71c9
gh-136438: Make sure `test_ast` pass with all optimization levels (#136596)

Explicitly pass an `optimizer` parameter to the calls of `ast.parse/compile`, because if it is not provided, the interpreter will use its internal state, which can be modified using the `-O` or `-OO` flags.

Co-authored-by: Kirill Podoprigora <kirill.bast9@mail.ru>
Lib/test/test_ast/test_ast.py