https://github.com/python/cpython/commit/96db216181e69222414155ec7140da8b313d4cca
commit: 96db216181e69222414155ec7140da8b313d4cca
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: iritkatriel <[email protected]>
date: 2024-10-19T12:14:18Z
summary:

[3.13] gh-125522: Fix bare except in test_math.testTan (GH-125544) (#125726)

gh-125522: Fix bare except in test_math.testTan (GH-125544)
(cherry picked from commit 4b421e8aca7f2dccc5ac8604b78589941dd7974c)

Co-authored-by: Irit Katriel <[email protected]>

files:
M Lib/test/test_math.py

diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index 8ba507cb2b0290..96ec55a09b0b26 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)))

_______________________________________________
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