0
0
mirror of https://github.com/python/cpython.git synced 2024-11-21 12:59:38 +01:00

gh-125522: Fix bare except in test_math.testTan (#125544)

This commit is contained in:
Irit Katriel 2024-10-19 12:49:14 +01:00 committed by GitHub
parent a7443a1735
commit 4b421e8aca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1902,7 +1902,7 @@ class MathTests(unittest.TestCase):
try:
self.assertTrue(math.isnan(math.tan(INF)))
self.assertTrue(math.isnan(math.tan(NINF)))
except:
except ValueError:
self.assertRaises(ValueError, math.tan, INF)
self.assertRaises(ValueError, math.tan, NINF)
self.assertTrue(math.isnan(math.tan(NAN)))