From 7f911f2220ef10b2126baf01d605663a7c21461a Mon Sep 17 00:00:00 2001 From: Lie Ryan Date: Mon, 18 Jul 2022 16:05:20 +1000 Subject: [PATCH] Add patchedast test for MatMult node --- ropetest/refactor/patchedasttest.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ropetest/refactor/patchedasttest.py b/ropetest/refactor/patchedasttest.py index 7e4f4edb7..9c9ea5798 100644 --- a/ropetest/refactor/patchedasttest.py +++ b/ropetest/refactor/patchedasttest.py @@ -175,6 +175,12 @@ def test_and_node(self): checker.check_region("BoolOp", 0, len(source) - 1) checker.check_children("BoolOp", [NameConstant, " ", "and", " ", NameConstant]) + def test_matmul_node(self): + source = "a @ b\n" + ast_frag = patchedast.get_patched_ast(source, True) + checker = _ResultChecker(self, ast_frag) + checker.check_children("BinOp", ["Name", " ", "@", " ", "Name"]) + def test_basic_closing_parens(self): source = "1 + (2)\n" ast_frag = patchedast.get_patched_ast(source, True)