From d92e12726da80d03667ace3abe0acdf13d6c423a Mon Sep 17 00:00:00 2001 From: "Davide Gessa (dakk)" Date: Mon, 3 Jun 2024 08:45:58 +0200 Subject: [PATCH] fix ast_rewriter testing for python 3.8 --- test/test_ast_rewriter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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"