Skip to content

Commit

Permalink
fix ast_rewriter testing for python 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
dakk committed Jun 3, 2024
1 parent b49eb33 commit d92e127
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/test_ast_rewriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def test_exponentiation_with_zero(self):
new_tree = self.rewriter.visit(tree)

self.assertTrue(len(new_tree.body), 1)
self.assertTrue(isinstance(new_tree.body[0]), ast.Assign)
self.assertTrue(isinstance(new_tree.body[0].value), ast.Constant)
self.assertEqual(isinstance(new_tree.body[0].value.value), 1)
self.assertTrue(isinstance(new_tree.body[0], ast.Assign))
self.assertTrue(isinstance(new_tree.body[0].value, ast.Constant))
self.assertEqual(new_tree.body[0].value.value, 1)

if sys.version_info >= (3, 9):
expected_code = "a = 1"
Expand Down

0 comments on commit d92e127

Please sign in to comment.