]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-125522: Fix bare except in test_math.testTan (GH-125544) (#125727)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 19 Oct 2024 12:07:16 +0000 (14:07 +0200)
committerGitHub <noreply@github.com>
Sat, 19 Oct 2024 12:07:16 +0000 (12:07 +0000)
gh-125522: Fix bare except in test_math.testTan (GH-125544)
(cherry picked from commit 4b421e8aca7f2dccc5ac8604b78589941dd7974c)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Lib/test/test_math.py

index 7e403f7ef25891555eda75d94b0a58947629f206..600946eeb8272d86f5ca81b9a529762a0fec8804 100644 (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)))