Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update test_pow.py from 3.13.7
  • Loading branch information
ShaharNaveh committed Aug 31, 2025
commit 88506059f98c0572369e3652666adaeeb5f154aa
11 changes: 5 additions & 6 deletions Lib/test/test_pow.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ def powtest(self, type):
self.assertEqual(pow(2, i), pow2)
if i != 30 : pow2 = pow2*2

for othertype in (int,):
for i in list(range(-10, 0)) + list(range(1, 10)):
ii = type(i)
for j in range(1, 11):
jj = -othertype(j)
pow(ii, jj)
for i in list(range(-10, 0)) + list(range(1, 10)):
ii = type(i)
inv = pow(ii, -1) # inverse of ii
for jj in range(-10, 0):
self.assertAlmostEqual(pow(ii, jj), pow(inv, -jj))

for othertype in int, float:
for i in range(1, 100):
Expand Down