Skip to content

Commit 985357e

Browse files
committed
Fix assertion in test_build_ast_schema
1 parent 12ef70b commit 985357e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/utilities/test_build_ast_schema.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ def print_ast_node(obj: TypeWithAstNode) -> str:
6262

6363

6464
def print_all_ast_nodes(obj: TypeWithExtensionAstNodes) -> str:
65-
assert obj is not None and obj.extension_ast_nodes is not None
65+
assert (
66+
obj is not None
67+
and obj.ast_node is not None
68+
and obj.extension_ast_nodes is not None
69+
)
6670
return print_ast(DocumentNode(definitions=[obj.ast_node, *obj.extension_ast_nodes]))
6771

6872

0 commit comments

Comments
 (0)