Skip to content

Commit

Permalink
Add patchedast test for MatMult node
Browse files Browse the repository at this point in the history
  • Loading branch information
lieryan committed Jul 18, 2022
1 parent f3ca93b commit b1b6a0a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ropetest/refactor/patchedasttest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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_matmult_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)
Expand Down

0 comments on commit b1b6a0a

Please sign in to comment.