From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Sat, 19 Oct 2024 11:49:14 +0000 (+0100) Subject: gh-125522: Fix bare except in test_math.testTan (#125544) X-Git-Tag: v3.14.0a2~364 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b421e8aca7f2dccc5ac8604b78589941dd7974c;p=thirdparty%2FPython%2Fcpython.git gh-125522: Fix bare except in test_math.testTan (#125544) --- diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index e2e2a419c777..fecafd53aa6e 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -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)))