Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pandas/tests/series/indexing/test_setitem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1025,7 +1025,7 @@ class TestSetitemNAPeriodDtype(SetitemCastingEquivalents):
def expected(self, key):
exp = Series(period_range("2000-01-01", periods=10, freq="D"))
exp._values.view("i8")[key] = NaT._value
assert exp[key] is NaT or all(x is NaT for x in exp[key])
assert exp[key] is NaT or any(x is NaT for x in exp)
Copy link
Member

Choose a reason for hiding this comment

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

if this was passing before, does it suggest that exp[key] is NaT is always the case?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point. Yeah I think then we can remove the or condition here

Copy link
Member Author

Choose a reason for hiding this comment

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

So after removing the condition in ae2376a some jobs are failing to appears we do hit the second condition somtimes

Copy link
Member

Choose a reason for hiding this comment

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

i guess depending on key, exp[key] could be a scalar or non-scalar. In the non-scalar case, i would expect the existing all assertion to hold. why am i wrong?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah OK I see now. I missed that key can be a slice.

return exp

@pytest.fixture
Expand Down
Loading