From 11114c868f8708c00f834c26932105949c6908d1 Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Sat, 19 Oct 2024 12:49:14 +0100 Subject: [PATCH] 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py index 7e403f7ef25891..600946eeb8272d 100644 --- a/Lib/test/test_math.py +++ b/Lib/test/test_math.py @@ -1886,7 +1886,7 @@ def testTan(self): 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)))