mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Issue #21193: Make (e.g.,) pow(2, -3, 5) raise ValueError rather than TypeError. Patch by Josh Rosenberg.
This commit is contained in:
parent
138185fa05
commit
0c346d827d
4 changed files with 6 additions and 2 deletions
|
@ -1085,7 +1085,7 @@ class BuiltinTest(unittest.TestCase):
|
|||
if isinstance(x, float) or \
|
||||
isinstance(y, float) or \
|
||||
isinstance(z, float):
|
||||
self.assertRaises(TypeError, pow, x, y, z)
|
||||
self.assertRaises(ValueError, pow, x, y, z)
|
||||
else:
|
||||
self.assertAlmostEqual(pow(x, y, z), 24.0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue