summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_builtin.py
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2019-06-02 09:24:06 (GMT)
committerGitHub <noreply@github.com>2019-06-02 09:24:06 (GMT)
commitc52996785a45d4693857ea219e040777a14584f8 (patch)
treeee1d54ea597b45ef0d57407f8affaffe57f93be6 /Lib/test/test_builtin.py
parent5ae299ac78abb628803ab7dee0997364547f5cc8 (diff)
downloadcpython-c52996785a45d4693857ea219e040777a14584f8.zip
cpython-c52996785a45d4693857ea219e040777a14584f8.tar.gz
cpython-c52996785a45d4693857ea219e040777a14584f8.tar.bz2
bpo-36027: Extend three-argument pow to negative second argument (GH-13266)
Diffstat (limited to 'Lib/test/test_builtin.py')
-rw-r--r--Lib/test/test_builtin.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py
index e32fb75..b536cec 100644
--- a/Lib/test/test_builtin.py
+++ b/Lib/test/test_builtin.py
@@ -1195,7 +1195,8 @@ class BuiltinTest(unittest.TestCase):
self.assertAlmostEqual(pow(-1, 0.5), 1j)
self.assertAlmostEqual(pow(-1, 1/3), 0.5 + 0.8660254037844386j)
- self.assertRaises(ValueError, pow, -1, -2, 3)
+ # See test_pow for additional tests for three-argument pow.
+ self.assertEqual(pow(-1, -2, 3), 1)
self.assertRaises(ValueError, pow, 1, 2, 0)
self.assertRaises(TypeError, pow)