[3.13] gh-125522: Fix bare except in test_math.testTan (GH-125544) (#125726)

gh-125522: Fix bare except in test_math.testTan (GH-125544)
(cherry picked from commit 4b421e8aca)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2024-10-19 14:14:18 +02:00 committed by GitHub
parent fbbc79ea25
commit 96db216181
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1886,7 +1886,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)))