summaryrefslogtreecommitdiff
path: root/Lib/test/test_augassign.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2015-04-13 16:44:05 -0500
committerZachary Ware <zachary.ware@gmail.com>2015-04-13 16:44:05 -0500
commit8cc6d42d475c53396afaf972f03bee07ee4739bd (patch)
treeff70de39fc13210d28c609aa90ff93d35a9db359 /Lib/test/test_augassign.py
parent187d9878e860b66d78bfd4c8d538130c72cc724a (diff)
parent81833b5e59153c758f894c851ad1ec4e7942c4b5 (diff)
downloadcpython-8cc6d42d475c53396afaf972f03bee07ee4739bd.tar.gz
Closes #23730: merge with 3.4
Diffstat (limited to 'Lib/test/test_augassign.py')
-rw-r--r--Lib/test/test_augassign.py21
1 files changed, 16 insertions, 5 deletions
diff --git a/Lib/test/test_augassign.py b/Lib/test/test_augassign.py
index 0e75c6bd32..5093e9d0f3 100644
--- a/Lib/test/test_augassign.py
+++ b/Lib/test/test_augassign.py
@@ -1,6 +1,5 @@
# Augmented assignment test.
-from test.support import run_unittest
import unittest
@@ -136,6 +135,14 @@ class AugAssignTest(unittest.TestCase):
output.append("__imul__ called")
return self
+ def __matmul__(self, val):
+ output.append("__matmul__ called")
+ def __rmatmul__(self, val):
+ output.append("__rmatmul__ called")
+ def __imatmul__(self, val):
+ output.append("__imatmul__ called")
+ return self
+
def __floordiv__(self, val):
output.append("__floordiv__ called")
return self
@@ -225,6 +232,10 @@ class AugAssignTest(unittest.TestCase):
1 * x
x *= 1
+ x @ 1
+ 1 @ x
+ x @= 1
+
x / 1
1 / x
x /= 1
@@ -271,6 +282,9 @@ __isub__ called
__mul__ called
__rmul__ called
__imul__ called
+__matmul__ called
+__rmatmul__ called
+__imatmul__ called
__truediv__ called
__rtruediv__ called
__itruediv__ called
@@ -300,8 +314,5 @@ __rlshift__ called
__ilshift__ called
'''.splitlines())
-def test_main():
- run_unittest(AugAssignTest)
-
if __name__ == '__main__':
- test_main()
+ unittest.main()