@@ -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