diff --git a/test/test_ast_rewriter.py b/test/test_ast_rewriter.py index 5f963a2a..9138830b 100644 --- a/test/test_ast_rewriter.py +++ b/test/test_ast_rewriter.py @@ -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"