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
1 changed files with 1 additions and 1 deletions

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)))