https://github.com/python/cpython/commit/4b421e8aca7f2dccc5ac8604b78589941dd7974c
commit: 4b421e8aca7f2dccc5ac8604b78589941dd7974c
branch: main
author: Irit Katriel <[email protected]>
committer: iritkatriel <[email protected]>
date: 2024-10-19T12:49:14+01:00
summary:

gh-125522: Fix bare except in test_math.testTan (#125544)

files:
M Lib/test/test_math.py

diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index e2e2a419c7778c..fecafd53aa6e6f 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -1902,7 +1902,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)))

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to