Skip to content

Commit e4cc128

Browse files
committed
fix prerelease tests
1 parent 42aadb5 commit e4cc128

2 files changed

Lines changed: 9 additions & 19 deletions

File tree

packages/bigframes/noxfile.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,11 +605,11 @@ def prerelease(session: nox.sessions.Session, tests_path, extra_pytest_options=(
605605
# Workaround https://github.com/googleapis/python-db-dtypes-pandas/issues/178
606606
"db-dtypes",
607607
# Ensure we catch breaking changes in the client libraries early.
608-
"git+https://github.com/googleapis/python-bigquery.git#egg=google-cloud-bigquery",
608+
"git+https://github.com/googleapis/google-cloud-python.git#egg=google-cloud-bigquery&subdirectory=packages/google-cloud-bigquery",
609609
"--upgrade",
610610
"-e",
611611
"git+https://github.com/googleapis/google-cloud-python.git#egg=google-cloud-bigquery-storage&subdirectory=packages/google-cloud-bigquery-storage",
612-
"git+https://github.com/googleapis/python-bigquery-pandas.git#egg=pandas-gbq",
612+
"git+https://github.com/googleapis/google-cloud-python.git#egg=pandas-gbq&subdirectory=packages/pandas-gbq",
613613
)
614614

615615
# Print out prerelease package versions.

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

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
import bigframes.pandas
3434
import bigframes.series as series
3535
import bigframes.testing
36+
import bigframes.testing.utils
3637
from bigframes.testing.utils import (
3738
assert_frame_equal,
3839
assert_series_equal,
@@ -1232,23 +1233,12 @@ def test_divmods_series(scalars_dfs, col_x, col_y, method):
12321233
scalars_pandas_df[col_y]
12331234
)
12341235
# BigQuery's mod functions return NUMERIC values for non-INT64 inputs.
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-
)
1243-
1244-
if bf_mod_result.dtype == pd.Int64Dtype():
1245-
bigframes.testing.utils.assert_series_equal(
1246-
pd_mod_result, bf_mod_result.to_pandas()
1247-
)
1248-
else:
1249-
bigframes.testing.utils.assert_series_equal(
1250-
pd_mod_result, bf_mod_result.astype("Float64").to_pandas()
1251-
)
1236+
bigframes.testing.utils.assert_series_equal(
1237+
pd_div_result, bf_div_result.to_pandas(), check_dtype=False
1238+
)
1239+
bigframes.testing.utils.assert_series_equal(
1240+
pd_mod_result, bf_mod_result.to_pandas(), check_dtype=False
1241+
)
12521242

12531243

12541244
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)