8000 [3.12] gh-125522: Fix bare except in test_math.testTan (GH-125544) (#… · python/cpython@5f6e112 · GitHub
[go: up one dir, main page]

Skip to content

Commit 5f6e112

Browse files
[3.12] gh-125522: Fix bare except in test_math.testTan (GH-125544) (#125727)
gh-125522: Fix bare except in test_math.testTan (GH-125544) (cherry picked from commit 4b421e8) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
1 parent 2ce10b1 commit 5f6e112

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/test/test_math.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1886,7 +1886,7 @@ def testTan(self):
18861886
try:
18871887
self.assertTrue(math.isnan(math.tan(INF)))
18881888
self.assertTrue(math.isnan(math.tan(NINF)))
1889-
except:
1889+
except ValueError:
18901890
self.assertRaises(ValueError, math.tan, INF)
18911891
self.assertRaises(ValueError, math.tan, NINF)
18921892
self.assertTrue(math.isnan(math.tan(NAN)))

0 commit comments

Comments
 (0)
0