Update python tests to reflect grammar changes

This commit is contained in:
Max Brunsfeld 2019-07-22 09:34:48 -07:00
parent f4740a1beb
commit 443ac1c1e5
2 changed files with 13 additions and 5 deletions

View file

@ -168,7 +168,15 @@ describe("Parser", () => {
tree = parser.parse("class A:\n def b():\n c()");
assert.equal(
tree.rootNode.toString(),
'(module (class_definition (identifier) (function_definition (identifier) (parameters) (expression_statement (call (identifier) (argument_list))))))'
'(module (class_definition ' +
'name: (identifier) ' +
'body: (block ' +
'(function_definition ' +
'name: (identifier) ' +
'parameters: (parameters) ' +
'body: (block (expression_statement (call ' +
'function: (identifier) ' +
'arguments: (argument_list))))))))'
);
}).timeout(5000);