diff options
Diffstat (limited to 'Lib/test/test_class.py')
| -rw-r--r-- | Lib/test/test_class.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py index e3883d6..6036e36 100644 --- a/Lib/test/test_class.py +++ b/Lib/test/test_class.py @@ -2,7 +2,6 @@ import unittest -from test import support testmeths = [ @@ -13,6 +12,8 @@ testmeths = [ "rsub", "mul", "rmul", + "matmul", + "rmatmul", "truediv", "rtruediv", "floordiv", @@ -177,6 +178,14 @@ class ClassTests(unittest.TestCase): self.assertCallStack([("__rmul__", (testme, 1))]) callLst[:] = [] + testme @ 1 + self.assertCallStack([("__matmul__", (testme, 1))]) + + callLst[:] = [] + 1 @ testme + self.assertCallStack([("__rmatmul__", (testme, 1))]) + + callLst[:] = [] testme / 1 self.assertCallStack([("__truediv__", (testme, 1))]) @@ -559,8 +568,5 @@ class ClassTests(unittest.TestCase): a = A(hash(A.f)^(-1)) hash(a.f) -def test_main(): - support.run_unittest(ClassTests) - -if __name__=='__main__': - test_main() +if __name__ == '__main__': + unittest.main() |
