8000 CI: Update version of 'black' by MarcoGorelli · Pull Request #36493 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

CI: Update version of 'black' #36493

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 12 commits into from
Sep 22, 2020
Prev Previous commit
Next Next commit
pandas/tests/arrays/sparse/test_array.py
  • Loading branch information
MarcoGorelli committed Sep 20, 2020
commit 4c67eb77670176fbe79754e23f701d60165dd041
15 changes: 12 additions & 3 deletions pandas/tests/arrays/sparse/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,10 @@ def test_constructor_inferred_fill_value(self, data, fill_value):
assert result == fill_value

@pytest.mark.parametrize("format", ["coo", "csc", "csr"])
@pytest.mark.parametrize("size", [0, 10])
@pytest.mark.parametrize(
"size",
[0, 10],
)
@td.skip_if_no_scipy
def test_from_spmatrix(self, size, format):
import scipy.sparse
Expand Down Expand Up @@ -694,15 +697,21 @@ def test_getslice_tuple(self):
res = sparse[
4:,
] # noqa: E231
exp = SparseArray(np.array([0, 5, np.nan, np.nan, 0]))
exp = SparseArray(
dense[
4:,
]
) # noqa: E231
Copy link
Member Author

Choose a reason for hiding this comment

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

Can the trailing comma be removed here? The explicit ignoring of Missing whitespace after ',', ';', or ':' (E231) suggests this is here on purpose

Copy link
Member

Choose a reason for hiding this comment

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

Since dense is a 1D array, it should be the same to remove it I think

tm.assert_sp_array_equal(res, exp)

sparse = SparseArray(dense, fill_value=0)
res = sparse[
4:,
] # noqa: E231
exp = SparseArray(
np.array([0, 5, np.nan, np.nan, 0]),
dense[
4:,
],
fill_value=0,
) # noqa: E231
tm.assert_sp_array_equal(res, exp)
Expand Down
0