Skip to content

Commit

Permalink
should work on CI (linux) even if it's buggy on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
gdementen committed Sep 13, 2023
1 parent eca467f commit c92ebca
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions larray/tests/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -3828,10 +3828,12 @@ def test_to_series():
assert res.equals(expected)

# test for issue #1061 (object dtype labels array produce warning with Pandas1.4+)
arr = ndtest("a=1..3", dtype=np.int64).with_total()[:3]
# for some reason, under Linux, int32 -> int64 in with_total or to_series()
arr = ndtest("a=1..3", dtype=np.int32).with_total()[:3]
assert arr.dtype.type is np.int64
res = arr.to_series()
int_index = pd.Index([1, 2, 3], dtype="int64", name='a')
expected = pd.Series([0, 1, 2], dtype="int64", index=int_index)
index = pd.Index([1, 2, 3], dtype=object, name='a')
expected = pd.Series([0, 1, 2], dtype="int64", index=index)
assert res.equals(expected)


Expand Down

0 comments on commit c92ebca

Please sign in to comment.