Skip to content

Commit

Permalink
Add xfail test for astype("uint") on arrow arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
NickCrews committed Aug 30, 2022
1 parent 9006160 commit d49452a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/astype_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ def test_astype_numeric_fails(nullable_ints, dtype):
nullable_ints.x.astype(dtype).tolist()


def test_astype_uint_string(df_factory_arrow, df_factory_arrow_chunked, df_factory_numpy):
# The string "uint" works for numpy but not arrow
x = [1, 2, None]
df_factory_numpy(x=x).x.astype("uint").tolist()
with pytest.raises(ValueError):
df_factory_arrow(x=x).x.astype("uint").tolist()
with pytest.raises(ValueError):
df_factory_arrow_chunked(x=x).x.astype("uint").tolist()


def test_astype_dtype():
df = vaex.from_arrays(x=[0, 1])
Expand Down

0 comments on commit d49452a

Please sign in to comment.