Skip to content

Add missing word in docstring of assertAlmostEqual of TestCase. #3998

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

Conversation

selotape
Copy link
Contributor

@selotape selotape commented Oct 14, 2017

A minor fix to the docstring of the assertAlmostEqual method of TestCase.

Added the word difference in the follwoing sentece - "... or by comparing that the difference between the two objects is more than the given delta."

@the-knights-who-say-ni
Copy link

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

@@ -852,7 +852,8 @@ def assertAlmostEqual(self, first, second, places=None, msg=None,
"""Fail if the two objects are unequal as determined by their
difference rounded to the given number of decimal places
(default 7) and comparing to zero, or by comparing that the
between the two objects is more than the given delta.
difference between the two objects is more than the given
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for the pull request @selotape!

The tests are failing because you have an extra space after the word "given".

screen shot 2017-10-17 at 10 28 37 am

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks even more for the review @dianaclarke !

I fixed the extra space, as well as the same phrasing issue in assertNotAlmostEqual

@selotape
Copy link
Contributor Author

selotape commented Oct 18, 2017

Hey @dianaclarke ,
Would you mind explaining to me how I should resolve the two issues raised by @bedevere-bot ?
Thanks!! I'm really sorry for the trouble.

@dianaclarke
Copy link
Member

@selotape A core reviewer will need to add "skip news" and "skip issue" labels to resolve the bedevere issues.

In the mean time, I would probably squash those two commits into one, update the commit message to reflect both changes, and remove the merge commit. You'll be able to do all that with git rebase -i. Let me know if you get stuck.

Cheers!

@selotape
Copy link
Contributor Author

selotape commented Oct 18, 2017

@dianaclarke , I did all that locally but am afraid of force-pushing the changes.

Should I open a new pull-request from another branch or just force-push?

@dianaclarke
Copy link
Member

@selotape If this becomes a rabbit hole, a new pull request is always an option, but I would just force push the change (and your pull request will magically update with the rewritten history). Give that a shot first.

@selotape selotape force-pushed the documentation/unittest_assertAlmostEqual branch from 96162ce to 90fa3c5 Compare October 18, 2017 15:43
@dianaclarke
Copy link
Member

@selotape Nice, that appears to have worked. Now we wait for a core reviewer. Rock on!

@miss-islington
Copy link
Contributor

Thanks @selotape for the PR, and @Mariatta for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7, 3.6.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-4039 is a backport of this pull request to the 3.6 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 18, 2017
…trings. (pythonGH-3998)

The word "difference" from missing the sentence.
This clarifies that it compares the difference between the two objects.
(cherry picked from commit 032a648)
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 18, 2017
…trings. (pythonGH-3998)

The word "difference" from missing the sentence.
This clarifies that it compares the difference between the two objects.
(cherry picked from commit 032a648)
@bedevere-bot
Copy link

GH-4040 is a backport of this pull request to the 2.7 branch.

@Mariatta
Copy link
Member

Nice catch. Thanks @selotape for the PR and congrats on your first contribution to CPython 🌮
Thanks @dianaclarke for the review.

Mariatta pushed a commit that referenced this pull request Oct 18, 2017
GH-3998) (GH-4040)

The word "difference" from missing the sentence.
This clarifies that it compares the difference between the two objects.
(cherry picked from commit 032a648)
Mariatta pushed a commit that referenced this pull request Oct 18, 2017
GH-3998) (GH-4039)

The word "difference" from missing the sentence.
This clarifies that it compares the difference between the two objects.
(cherry picked from commit 032a648)
@selotape selotape deleted the documentation/unittest_assertAlmostEqual branch October 18, 2017 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants