Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 19, 2024

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Oct 15, 2024

This is a simple rewrite of the test to avoid bare except and make the test's intention clearer

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
@iritkatriel iritkatriel changed the title gh-125522: rewrite test_math.testTan to clarify intention gh-125522: Add exception type in try-exception in test_math.testTan Oct 18, 2024
@iritkatriel iritkatriel changed the title gh-125522: Add exception type in try-exception in test_math.testTan gh-125522: Fix bare except in test_math.testTan Oct 18, 2024
@serhiy-storchaka serhiy-storchaka added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Oct 19, 2024
Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@skirpichev
Copy link
Contributor

@serhiy-storchaka, what do you think on keeping only self.assertRaises?

@serhiy-storchaka
Copy link
Member

I think that this test implies that NaN is a valid returning value. If we want to change this, open a separate issue. It should be discussed with Mark and Tim.

@iritkatriel iritkatriel merged commit 4b421e8 into python:main Oct 19, 2024
36 checks passed
@miss-islington-app
Copy link

Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 19, 2024
(cherry picked from commit 4b421e8)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 19, 2024
(cherry picked from commit 4b421e8)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 19, 2024

GH-125726 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Oct 19, 2024
@bedevere-app
Copy link

bedevere-app bot commented Oct 19, 2024

GH-125727 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Oct 19, 2024
iritkatriel added a commit that referenced this pull request Oct 19, 2024
…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>
iritkatriel added a commit that referenced this pull request Oct 19, 2024
…125726)

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>
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip news tests Tests in the Lib/test dir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy