Skip to content

Commit 9dee7f3

Browse files
mroeschkepmhatre1
authored andcommitted
CI: Fix npdev failures (pandas-dev#58389)
* CI: Fix npdev failures * Use unique index, make array writable * Update pandas/_libs/hashtable_class_helper.pxi.in * Update pandas/tests/arrays/test_datetimelike.py * Update pandas/tests/arrays/test_datetimelike.py
1 parent e19a8ea commit 9dee7f3

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

pandas/tests/arrays/test_datetimelike.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,9 @@ def test_array_interface(self, datetime_index):
661661
assert result is expected
662662
tm.assert_numpy_array_equal(result, expected)
663663
result = np.array(arr, dtype="datetime64[ns]")
664-
assert result is not expected
664+
if not np_version_gt2:
665+
# TODO: GH 57739
666+
assert result is not expected
665667
tm.assert_numpy_array_equal(result, expected)
666668

667669
# to object dtype
@@ -976,7 +978,9 @@ def test_array_interface(self, timedelta_index):
976978
assert result is expected
977979
tm.assert_numpy_array_equal(result, expected)
978980
result = np.array(arr, dtype="timedelta64[ns]")
979-
assert result is not expected
981+
if not np_version_gt2:
982+
# TODO: GH 57739
983+
assert result is not expected
980984
tm.assert_numpy_array_equal(result, expected)
981985

982986
# to object dtype

pandas/tests/extension/base/missing.py

+2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ def test_isna_returns_copy(self, data_missing, na_func):
2727
expected = result.copy()
2828
mask = getattr(result, na_func)()
2929
if isinstance(mask.dtype, pd.SparseDtype):
30+
# TODO: GH 57739
3031
mask = np.array(mask)
32+
mask.flags.writeable = True
3133

3234
mask[:] = True
3335
tm.assert_series_equal(result, expected)

pandas/tests/indexes/test_base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ def test_constructor_casting(self, index):
7171
tm.assert_contains_all(arr, new_index)
7272
tm.assert_index_equal(index, new_index)
7373

74-
@pytest.mark.parametrize("index", ["string"], indirect=True)
75-
def test_constructor_copy(self, index, using_infer_string):
74+
def test_constructor_copy(self, using_infer_string):
75+
index = Index(list("abc"), name="name")
7676
arr = np.array(index)
7777
new_index = Index(arr, copy=True, name="name")
7878
assert isinstance(new_index, Index)

0 commit comments

Comments
 (0)