Distinguish decorator '@' from matrix mult.
Closes #350
diff --git a/yapftests/reformatter_python3_test.py b/yapftests/reformatter_python3_test.py
index f9690ee..b17b89c 100644
--- a/yapftests/reformatter_python3_test.py
+++ b/yapftests/reformatter_python3_test.py
@@ -171,6 +171,16 @@
uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
+ def testMatrixMultiplication(self):
+ unformatted_code = textwrap.dedent("""\
+ a=b@c
+ """)
+ expected_formatted_code = textwrap.dedent("""\
+ a = b @ c
+ """)
+ uwlines = yapf_test_helper.ParseAndUnwrap(unformatted_code)
+ self.assertCodeEqual(expected_formatted_code, reformatter.Reformat(uwlines))
+
def testAsyncWithPrecedingComment(self):
if sys.version_info[1] < 5:
return