mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
test the change of #21193 correctly
This commit is contained in:
parent
0c346d827d
commit
f84200ffc7
1 changed files with 2 additions and 2 deletions
|
@ -1085,14 +1085,14 @@ class BuiltinTest(unittest.TestCase):
|
|||
if isinstance(x, float) or \
|
||||
isinstance(y, float) or \
|
||||
isinstance(z, float):
|
||||
self.assertRaises(ValueError, pow, x, y, z)
|
||||
self.assertRaises(TypeError, pow, x, y, z)
|
||||
else:
|
||||
self.assertAlmostEqual(pow(x, y, z), 24.0)
|
||||
|
||||
self.assertAlmostEqual(pow(-1, 0.5), 1j)
|
||||
self.assertAlmostEqual(pow(-1, 1/3), 0.5 + 0.8660254037844386j)
|
||||
|
||||
self.assertRaises(TypeError, pow, -1, -2, 3)
|
||||
self.assertRaises(ValueError, pow, -1, -2, 3)
|
||||
self.assertRaises(ValueError, pow, 1, 2, 0)
|
||||
|
||||
self.assertRaises(TypeError, pow)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue