Skip to content

Commit 0969bec

Browse files
committed
undo test_series changes
1 parent fa9be1c commit 0969bec

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

packages/bigframes/tests/system/small/test_series.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1232,9 +1232,14 @@ def test_divmods_series(scalars_dfs, col_x, col_y, method):
12321232
scalars_pandas_df[col_y]
12331233
)
12341234
# BigQuery's mod functions return NUMERIC values for non-INT64 inputs.
1235-
bigframes.testing.utils.assert_series_equal(
1236-
pd_div_result, bf_div_result.astype("Float64").to_pandas()
1237-
)
1235+
if bf_div_result.dtype == pd.Int64Dtype():
1236+
bigframes.testing.utils.assert_series_equal(
1237+
pd_div_result, bf_div_result.to_pandas(), check_dtype=False
1238+
)
1239+
else:
1240+
bigframes.testing.utils.assert_series_equal(
1241+
pd_div_result, bf_div_result.astype("Float64").to_pandas()
1242+
)
12381243

12391244
if bf_mod_result.dtype == pd.Int64Dtype():
12401245
bigframes.testing.utils.assert_series_equal(
@@ -1272,9 +1277,14 @@ def test_divmods_scalars(scalars_dfs, col_x, other, method):
12721277
bf_div_result, bf_mod_result = getattr(scalars_df[col_x], method)(other)
12731278
pd_div_result, pd_mod_result = getattr(scalars_pandas_df[col_x], method)(other)
12741279
# BigQuery's mod functions return NUMERIC values for non-INT64 inputs.
1275-
bigframes.testing.utils.assert_series_equal(
1276-
pd_div_result, bf_div_result.astype("Float64").to_pandas()
1277-
)
1280+
if bf_div_result.dtype == pd.Int64Dtype():
1281+
bigframes.testing.utils.assert_series_equal(
1282+
pd_div_result, bf_div_result.to_pandas(), check_dtype=False
1283+
)
1284+
else:
1285+
bigframes.testing.utils.assert_series_equal(
1286+
pd_div_result, bf_div_result.astype("Float64").to_pandas()
1287+
)
12781288

12791289
if bf_mod_result.dtype == pd.Int64Dtype():
12801290
bigframes.testing.utils.assert_series_equal(

0 commit comments

Comments
 (0)