Skip to content

Commit a19aea0

Browse files
committed
test: remove pandas version restrictions and fix precision issue
1 parent cef659d commit a19aea0

2 files changed

Lines changed: 2 additions & 3 deletions

File tree

packages/google-cloud-bigquery/tests/system/test_pandas.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,6 @@ def test_list_rows_max_results_w_bqstorage(bigquery_client):
10531053
assert len(dataframe.index) == 100
10541054

10551055

1056-
@pytest.mark.skipif(PANDAS_INSTALLED_VERSION[0:2] not in ["0.", "1."], reason="")
10571056
@pytest.mark.parametrize(
10581057
("max_results",),
10591058
(

packages/google-cloud-bigquery/tests/unit/test__pandas_helpers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,15 +551,15 @@ def test_bq_to_arrow_array_w_nullable_scalars(module_under_test, bq_type, rows):
551551
],
552552
)
553553
@pytest.mark.skipif(pandas is None, reason="Requires `pandas`")
554-
@pytest.mark.skipif(PANDAS_INSTALLED_VERSION[0:2] not in ["0.", "1."], reason="")
555554
@pytest.mark.skipif(isinstance(pyarrow, mock.Mock), reason="Requires `pyarrow`")
556555
def test_bq_to_arrow_array_w_pandas_timestamp(module_under_test, bq_type, rows):
557556
rows = [pandas.Timestamp(row) for row in rows]
558557
series = pandas.Series(rows)
559558
bq_field = schema.SchemaField("field_name", bq_type)
560559
arrow_array = module_under_test.bq_to_arrow_array(series, bq_field)
561560
roundtrip = arrow_array.to_pandas()
562-
assert series.equals(roundtrip)
561+
series = series.astype(roundtrip.dtype)
562+
pandas.testing.assert_series_equal(series, roundtrip)
563563

564564

565565
@pytest.mark.skipif(pandas is None, reason="Requires `pandas`")

0 commit comments

Comments
 (0)