Skip to content

Commit 1806585

Browse files
Fix test_ast to work with -OO
1 parent 9be3649 commit 1806585

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/test_ast/test_ast.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2537,7 +2537,7 @@ def test_assign_to_constant(self):
25372537
"to in Store context")
25382538

25392539
def test_get_docstring(self):
2540-
tree = ast.parse("'docstring'\nx = 1")
2540+
tree = ast.parse("'docstring'\nx = 1", optimize=False)
25412541
self.assertEqual(ast.get_docstring(tree), 'docstring')
25422542

25432543
def get_load_const(self, tree):

0 commit comments

Comments
 (0)