]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-125522: Fix bare except in test_math.testTan (#125544)
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Sat, 19 Oct 2024 11:49:14 +0000 (12:49 +0100)
committerGitHub <noreply@github.com>
Sat, 19 Oct 2024 11:49:14 +0000 (12:49 +0100)
Lib/test/test_math.py

index e2e2a419c7778c924cfff573a8b00f87ddc7002a..fecafd53aa6e6f1a3552a44ee72df7fe5be0c717 100644 (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)))