Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 19.4k
STY: Enable ruff pytest checks#56671
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
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
e672f7b6ce08dbfc2e0d2d2255648fe6476d99f3928d27e34d7379bd0cdc13a78692da893cf5b570212247ce700a2ebb713ea2e08022135becf0592dd879a6cfaa72a01adb5a477d2d27458b8bd520b1331c2ce354f6bce0511ebe01472dc2dc60a9f3be5ab9c6d65044e4729547ece5File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -73,12 +73,12 @@ def test_set_dtype_new_categories(self): | ||
| (["a", "b", "c"], ["a", "b"], ["a", "b"]), | ||
| (["a", "b", "c"], ["a", "b"], ["b", "a"]), | ||
| (["b", "a", "c"], ["a", "b"], ["a", "b"]), | ||
| (["b", "a", "c"], ["a", "b"], ["a", "b"]), | ||
| (["b", "a", "c"], ["a", "b"], ["b", "a"]), | ||
| # Introduce NaNs | ||
| (["a", "b", "c"], ["a", "b"], ["a"]), | ||
| (["a", "b", "c"], ["a", "b"], ["b"]), | ||
| (["b", "a", "c"], ["a", "b"], ["a"]), | ||
| (["b", "a", "c"], ["a", "b"], ["a"]), | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this be "b"? MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch. Fixed | ||
| (["b", "a", "c"], ["a", "b"], ["b"]), | ||
| # No overlap | ||
| (["a", "b", "c"], ["a", "b"], ["d", "e"]), | ||
| ], | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -209,7 +209,8 @@ def test_setitem_integer_array(self, data, idx, box_in_series): | ||
| [0, 1, 2, pd.NA], True, marks=pytest.mark.xfail(reason="GH-31948") | ||
| ), | ||
| (pd.array([0, 1, 2, pd.NA], dtype="Int64"), False), | ||
| (pd.array([0, 1, 2, pd.NA], dtype="Int64"), False), | ||
| # TODO: change False to True? | ||
| (pd.array([0, 1, 2, pd.NA], dtype="Int64"), False), # noqa: PT014 | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, this is a dupe right? MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yup but changing it to Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you open an issue as a followup? (the noqa makes it look like ruff had a false positive) MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sure, #56727 | ||
| ], | ||
| ids=["list-False", "list-True", "integer-array-False", "integer-array-True"], | ||
| ) | ||
| @@ -332,7 +333,7 @@ def test_setitem_loc_iloc_slice(self, data): | ||
| def test_setitem_slice_mismatch_length_raises(self, data): | ||
| arr = data[:5] | ||
| with pytest.raises(ValueError): | ||
| with tm.external_error_raised(ValueError): | ||
lithomas1 marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| arr[:1] = arr[:2] | ||
| def test_setitem_slice_array(self, data): | ||
| @@ -342,7 +343,7 @@ def test_setitem_slice_array(self, data): | ||
| def test_setitem_scalar_key_sequence_raise(self, data): | ||
| arr = data[:5].copy() | ||
| with pytest.raises(ValueError): | ||
| with tm.external_error_raised(ValueError): | ||
| arr[0] = arr[[0, 1]] | ||
| def test_setitem_preserves_views(self, data): | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -373,19 +373,6 @@ def test_setitem_mask(self, data, mask, box_in_series): | ||
| def test_setitem_integer_array(self, data, idx, box_in_series): | ||
| super().test_setitem_integer_array(data, idx, box_in_series) | ||
| @pytest.mark.parametrize( | ||
| "idx, box_in_series", | ||
| [ | ||
| ([0, 1, 2, pd.NA], False), | ||
| pytest.param([0, 1, 2, pd.NA], True, marks=pytest.mark.xfail), | ||
| (pd.array([0, 1, 2, pd.NA], dtype="Int64"), False), | ||
| (pd.array([0, 1, 2, pd.NA], dtype="Int64"), False), | ||
| ], | ||
| ids=["list-False", "list-True", "integer-array-False", "integer-array-True"], | ||
| ) | ||
| def test_setitem_integer_with_missing_raises(self, data, idx, box_in_series): | ||
lithomas1 marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading. Please reload this page. | ||
| super().test_setitem_integer_with_missing_raises(data, idx, box_in_series) | ||
| @skip_nested | ||
| def test_setitem_slice(self, data, box_in_series): | ||
| super().test_setitem_slice(data, box_in_series) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1555,7 +1555,7 @@ def test_constructor_mixed_type_rows(self): | ||
| "tuples,lists", | ||
| [ | ||
| ((), []), | ||
| ((()), []), | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hm, was this supposed to contain an inner tuple like MemberAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah possibly yes. That passes here so added it | ||
| (((),), [[]]), | ||
| (((), ()), [(), ()]), | ||
| (((), ()), [[], []]), | ||
| (([], []), [[], []]), | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -304,7 +304,6 @@ def test_from_arrays_empty(): | ||
| (1, 2), | ||
| ([1], 2), | ||
| (1, [2]), | ||
| "a", | ||
| ("a",), | ||
| ("a", "b"), | ||
| (["a"], "b"), | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this end with ["b", "a"]?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Fixed