aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/support/ast_helper.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/support/ast_helper.py')
-rw-r--r--Lib/test/support/ast_helper.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/support/ast_helper.py b/Lib/test/support/ast_helper.py
index 8a0415b6aae..173d299afee 100644
--- a/Lib/test/support/ast_helper.py
+++ b/Lib/test/support/ast_helper.py
@@ -16,6 +16,9 @@ class ASTTestMixin:
self.fail(f"{type(a)!r} is not {type(b)!r}")
if isinstance(a, ast.AST):
for field in a._fields:
+ if isinstance(a, ast.Constant) and field == "kind":
+ # Skip the 'kind' field for ast.Constant
+ continue
value1 = getattr(a, field, missing)
value2 = getattr(b, field, missing)
# Singletons are equal by definition, so further