Skip to content

Conversation

@azerty-svg
Copy link

Tests about pow(0, 0). According to the documentation it should return 1. Currently there is no checking for this.

Tests about pow(0, 0). According to the documentation it should return 1.
@python-cla-bot
Copy link

python-cla-bot bot commented Jul 17, 2025

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Jul 17, 2025

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app bedevere-app bot added the tests Tests in the Lib/test dir label Jul 17, 2025
@azerty-svg azerty-svg changed the title Update test_math.py Update test_math.py skip issue Jul 17, 2025
@skirpichev
Copy link
Contributor

Thanks for a pr, but there are such tests:

$ git grep -n 'pow(0' Lib/test/test_math.py 
Lib/test/test_math.py:1685:        self.ftest('pow(0,1)', math.pow(0,1), 0)
Lib/test/test_math.py:1695:        self.assertTrue(math.isnan(math.pow(0, NAN)))
Lib/test/test_math.py:1699:        # pow(0., x)
Lib/test/test_math.py:1700:        self.assertEqual(math.pow(0., INF), 0.)
Lib/test/test_math.py:1701:        self.assertEqual(math.pow(0., 3.), 0.)
Lib/test/test_math.py:1702:        self.assertEqual(math.pow(0., 2.3), 0.)
Lib/test/test_math.py:1703:        self.assertEqual(math.pow(0., 2.), 0.)
Lib/test/test_math.py:1704:        self.assertEqual(math.pow(0., 0.), 1.)
Lib/test/test_math.py:1705:        self.assertEqual(math.pow(0., -0.), 1.)
Lib/test/test_math.py:1709:        self.assertEqual(math.pow(0., NINF), INF)
Lib/test/test_math.py:1710:        self.assertTrue(math.isnan(math.pow(0., NAN)))
Lib/test/test_math.py:1792:        self.assertEqual(math.pow(0.9, NINF), INF)
Lib/test/test_math.py:1793:        self.assertEqual(math.pow(0.1, NINF), INF)
Lib/test/test_math.py:1802:        self.assertEqual(math.pow(0.9, INF), 0.)
Lib/test/test_math.py:1803:        self.assertEqual(math.pow(0.1, INF), 0.)
$ git grep -n 'pow(-0' Lib/test/test_math.py 
Lib/test/test_math.py:1725:        # pow(-0., x)
Lib/test/test_math.py:1726:        self.assertEqual(math.pow(-0., INF), 0.)
Lib/test/test_math.py:1727:        self.assertEqual(math.pow(-0., 3.), -0.)
Lib/test/test_math.py:1728:        self.assertEqual(math.pow(-0., 2.3), 0.)
Lib/test/test_math.py:1729:        self.assertEqual(math.pow(-0., 2.), 0.)
Lib/test/test_math.py:1730:        self.assertEqual(math.pow(-0., 0.), 1.)
Lib/test/test_math.py:1731:        self.assertEqual(math.pow(-0., -0.), 1.)
Lib/test/test_math.py:1735:        self.assertEqual(math.pow(-0., NINF), INF)
Lib/test/test_math.py:1736:        self.assertTrue(math.isnan(math.pow(-0., NAN)))
Lib/test/test_math.py:1794:        self.assertEqual(math.pow(-0.1, NINF), INF)
Lib/test/test_math.py:1795:        self.assertEqual(math.pow(-0.9, NINF), INF)
Lib/test/test_math.py:1804:        self.assertEqual(math.pow(-0.1, INF), 0.)
Lib/test/test_math.py:1805:        self.assertEqual(math.pow(-0.9, INF), 0.)

What's missing?

@azerty-svg
Copy link
Author

I didn't saw them... sorry

@azerty-svg azerty-svg closed this Jul 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants