Skip to content

TST closes #28980 Certain comparison operations misbehaving for period dtype #34417

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
May 28, 2020

Conversation

OlivierLuG
Copy link
Contributor

@OlivierLuG OlivierLuG commented May 27, 2020

I've added test to compare pd.Series([...], dtype="period[A-DEC]") to dtype str, bool, int, float and None.

@dsaxton
Copy link
Member

dsaxton commented May 27, 2020

Looks pretty good, can you modify the description with "closes" in front of the issue number so that it'll be closed automatically when this is merged?

@OlivierLuG OlivierLuG changed the title TST #28980 Certain comparison operations misbehaving for period dtype TST closes #28980 Certain comparison operations misbehaving for period dtype May 27, 2020
@dsaxton
Copy link
Member

dsaxton commented May 27, 2020

can you modify the description with "closes" in front of the issue number

@OlivierLuG I meant the description of the PR (where you have the bulleted list) rather than the PR title

@dsaxton dsaxton added the Testing pandas testing functions or related to the test suite label May 27, 2020
@jreback jreback added the Period Period data type label May 28, 2020
@jreback jreback added this to the 1.1 milestone May 28, 2020
@OlivierLuG
Copy link
Contributor Author

Hello, If you think this is correct, I can pull a new request to close #28981, which test about the same tests ?

@jreback jreback merged commit 0650c0b into pandas-dev:master May 28, 2020
@jreback
Copy link
Contributor

jreback commented May 28, 2020

thanks

@OlivierLuG OlivierLuG deleted the test_period branch May 28, 2020 21:44
@@ -1522,3 +1522,11 @@ def test_pi_sub_period_nat(self):
exp = pd.TimedeltaIndex([np.nan, np.nan, np.nan, np.nan], name="idx")
tm.assert_index_equal(idx - pd.Period("NaT", freq="M"), exp)
tm.assert_index_equal(pd.Period("NaT", freq="M") - idx, exp)

@pytest.mark.parametrize("scalars", ["a", False, 1, 1.0, None])
def test_comparison_operations(self, scalars):
Copy link
Member

Choose a reason for hiding this comment

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

why not use the box_with_array fixture?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Period Period data type Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Certain comparison operations misbehaving for period dtype
4 participants