Skip to content

Commit

Permalink
Backport PR pandas-dev#58389: CI: Fix npdev failures
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeschke authored and meeseeksmachine committed Apr 24, 2024
1 parent 294b215 commit ab00a32
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
8 changes: 6 additions & 2 deletions pandas/tests/arrays/test_datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,9 @@ def test_array_interface(self, datetime_index):
assert result is expected
tm.assert_numpy_array_equal(result, expected)
result = np.array(arr, dtype="datetime64[ns]")
assert result is not expected
if not np_version_gt2:
# TODO: GH 57739
assert result is not expected
tm.assert_numpy_array_equal(result, expected)

# to object dtype
Expand Down Expand Up @@ -974,7 +976,9 @@ def test_array_interface(self, timedelta_index):
assert result is expected
tm.assert_numpy_array_equal(result, expected)
result = np.array(arr, dtype="timedelta64[ns]")
assert result is not expected
if not np_version_gt2:
# TODO: GH 57739
assert result is not expected
tm.assert_numpy_array_equal(result, expected)

# to object dtype
Expand Down
2 changes: 2 additions & 0 deletions pandas/tests/extension/base/missing.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ def test_isna_returns_copy(self, data_missing, na_func):
expected = result.copy()
mask = getattr(result, na_func)()
if isinstance(mask.dtype, pd.SparseDtype):
# TODO: GH 57739
mask = np.array(mask)
mask.flags.writeable = True

mask[:] = True
tm.assert_series_equal(result, expected)
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/indexes/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ def test_constructor_casting(self, index):
tm.assert_contains_all(arr, new_index)
tm.assert_index_equal(index, new_index)

@pytest.mark.parametrize("index", ["string"], indirect=True)
def test_constructor_copy(self, index, using_infer_string):
def test_constructor_copy(self, using_infer_string):
index = Index(list("abc"), name="name")
arr = np.array(index)
new_index = Index(arr, copy=True, name="name")
assert isinstance(new_index, Index)
Expand Down

0 comments on commit ab00a32

Please sign in to comment.