summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_operator.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_operator.py')
-rw-r--r--Lib/test/test_operator.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_operator.py b/Lib/test/test_operator.py
index f1e2959..611e427 100644
--- a/Lib/test/test_operator.py
+++ b/Lib/test/test_operator.py
@@ -161,6 +161,12 @@ class OperatorTestCase(unittest.TestCase):
self.failUnless(operator.pos(0) == 0)
self.failUnless(operator.pos(-0) == 0)
+ def test_pow(self):
+ self.failUnless(operator.pow(3,5) == 3**5)
+ self.failUnless(operator.__pow__(3,5) == 3**5)
+ self.assertRaises(TypeError, operator.pow, 1)
+ self.assertRaises(TypeError, operator.pow, 1, 2, 3)
+
def test_repeat(self):
a = range(3)
self.failUnless(operator.repeat(a, 2) == a+a)