Skip to content

TST: Test for bug fixed during #22534 discussion #22694

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 2 commits into from
Sep 15, 2018

Conversation

jbrockmendel
Copy link
Member

In the course of profiling #22534 a bug was found, but that PR was made redundant and the bug fixed in master. This just adds a test for that bug.

@pep8speaks
Copy link

Hello @jbrockmendel! Thanks for submitting the PR.

@gfyoung gfyoung added Testing pandas testing functions or related to the test suite Numeric Operations Arithmetic, Comparison, and Logical operations labels Sep 14, 2018

result = df.add(tser, axis=0)
expected = pd.DataFrame({0: dti + tdi,
1: tdi + tdi})
Copy link
Member

Choose a reason for hiding this comment

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

I generally prefer that the expected be as explicit as possible i.e., write out the actual result of those "sums" instead of the expression. You can add a comment if needed to describe that we expected dti + tdi and tdi + tdi.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with you generally, but these types of tests its ok.

@jreback jreback added this to the 0.24.0 milestone Sep 15, 2018
@jreback jreback merged commit 45bbca0 into pandas-dev:master Sep 15, 2018
@jbrockmendel jbrockmendel deleted the test_add branch September 15, 2018 15:07
aeltanawy pushed a commit to aeltanawy/pandas that referenced this pull request Sep 20, 2018
Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Numeric Operations Arithmetic, Comparison, and Logical operations Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants