Skip to content

Commit f75f5bf

Browse files
committed
skip null
1 parent 4aa47a8 commit f75f5bf

File tree

1 file changed

+32
-10
lines changed

1 file changed

+32
-10
lines changed

tests/unit/test_series_polars.py

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,20 @@ def scalars_pandas_df_index() -> pd.DataFrame:
7575
return df.set_index("rowindex").sort_index()
7676

7777

78+
@pytest.fixture(scope="module")
79+
def scalars_df_default_index(
80+
session: bigframes.Session, scalars_pandas_df_index
81+
) -> bpd.DataFrame:
82+
return session.read_pandas(scalars_pandas_df_index).reset_index(drop=False)
83+
84+
85+
@pytest.fixture(scope="module")
86+
def scalars_df_2_default_index(
87+
session: bigframes.Session, scalars_pandas_df_index
88+
) -> bpd.DataFrame:
89+
return session.read_pandas(scalars_pandas_df_index).reset_index(drop=False)
90+
91+
7892
@pytest.fixture(scope="module")
7993
def scalars_df_index(
8094
session: bigframes.Session, scalars_pandas_df_index
@@ -376,9 +390,9 @@ def test_series_construct_w_dtype_for_array_struct():
376390
)
377391

378392

379-
def test_series_construct_local_unordered_has_sequential_index(unordered_session):
393+
def test_series_construct_local_unordered_has_sequential_index(session):
380394
series = bigframes.pandas.Series(
381-
["Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"], session=unordered_session
395+
["Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"], session=session
382396
)
383397
expected: pd.Index = pd.Index([0, 1, 2, 3, 4, 5, 6], dtype=pd.Int64Dtype())
384398
pd.testing.assert_index_equal(series.index.to_pandas(), expected)
@@ -469,13 +483,6 @@ def test_get_column(scalars_dfs, col_name, expected_dtype):
469483
assert series_pandas.shape[0] == scalars_pandas_df.shape[0]
470484

471485

472-
def test_get_column_w_json(json_df, json_pandas_df):
473-
series = json_df["json_col"]
474-
series_pandas = series.to_pandas()
475-
assert series.dtype == pd.ArrowDtype(db_dtypes.JSONArrowType())
476-
assert series_pandas.shape[0] == json_pandas_df.shape[0]
477-
478-
479486
def test_series_get_column_default(scalars_dfs):
480487
scalars_df, _ = scalars_dfs
481488
result = scalars_df.get(123123123123123, "default_val")
@@ -1062,7 +1069,22 @@ def test_series_pow_scalar_reverse(scalars_dfs):
10621069
"xor",
10631070
],
10641071
)
1065-
@pytest.mark.parametrize(("other_scalar"), [True, False, pd.NA])
1072+
@pytest.mark.parametrize(
1073+
("other_scalar"),
1074+
[
1075+
True,
1076+
False,
1077+
pytest.param(
1078+
pd.NA,
1079+
marks=[
1080+
pytest.mark.skip(
1081+
reason="https://github.com/pola-rs/polars/issues/24809"
1082+
)
1083+
],
1084+
id="NULL",
1085+
),
1086+
],
1087+
)
10661088
@pytest.mark.parametrize(("reverse_operands"), [True, False])
10671089
def test_series_bool_bool_operators_scalar(
10681090
scalars_dfs, operator, other_scalar, reverse_operands

0 commit comments

Comments
 (0)