From 538a5a68db8242995ae27ef96f2cb7ae6e585e2e Mon Sep 17 00:00:00 2001 From: Nick Crews Date: Mon, 29 Aug 2022 16:30:40 -0800 Subject: [PATCH] Add xfail test for astype("uint") on arrow arrays --- tests/astype_test.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/astype_test.py b/tests/astype_test.py index 309955cb70..81a1963aef 100644 --- a/tests/astype_test.py +++ b/tests/astype_test.py @@ -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])