Skip to content
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

6057 tolerance on complex approx #6058

Merged

Conversation

AnjoMan
Copy link
Contributor

@AnjoMan AnjoMan commented Oct 25, 2019

Adds a tolerance indicator to pytest.approx when the expected value is a complex number. This should make it easier to reason about how complex number approximations are handled by pytest.

Relates to #6057.

Copy link
Contributor

@kalekundert kalekundert left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks for implementing this feature, the original version of the code really wasn't even trying to repr complex numbers nicely.

@AnjoMan
Copy link
Contributor Author

AnjoMan commented Oct 25, 2019

@kalekundert I made the change you requested. Thanks for your review!

@kalekundert kalekundert merged commit b9df9a4 into pytest-dev:features Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants