Author: Richard Plangger <planri...@gmail.com>
Branch: py3.5
Changeset: r84510:fbe34cd0ea0e
Date: 2016-05-17 19:54 +0200
http://bitbucket.org/pypy/pypy/changeset/fbe34cd0ea0e/

Log:    added test to check the python parser for matmul (this passes) but
        not imatmul

diff --git a/pypy/interpreter/astcompiler/test/test_astbuilder.py 
b/pypy/interpreter/astcompiler/test/test_astbuilder.py
--- a/pypy/interpreter/astcompiler/test/test_astbuilder.py
+++ b/pypy/interpreter/astcompiler/test/test_astbuilder.py
@@ -1315,3 +1315,14 @@
     def test_cpython_issue12983(self):
         raises(SyntaxError, self.get_ast, r"""b'\x'""")
         raises(SyntaxError, self.get_ast, r"""b'\x0'""")
+
+    def test_matmul(self):
+        mod = self.get_ast("a @ b")
+        assert isinstance(mod, ast.Module)
+        body = mod.body
+        assert len(body) == 1
+        expr = body[0].value
+        assert expr.op == ast.MatMul
+        assert isinstance(expr.left, ast.Name)
+        assert isinstance(expr.right, ast.Name)
+        # imatmul is tested earlier search for @=
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to