Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/unit/test_reader_v1_arrow.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import pandas
import pandas.testing
import pytest
import pkg_resources

import google.api_core.exceptions
from google.cloud.bigquery_storage import types
Expand All @@ -28,6 +29,11 @@

pyarrow = pytest.importorskip("pyarrow")

if pandas is not None: # pragma: NO COVER
PANDAS_INSTALLED_VERSION = pkg_resources.get_distribution("pandas").parsed_version
else: # pragma: NO COVER
PANDAS_INSTALLED_VERSION = pkg_resources.parse_version("0.0.0")


# This dictionary is duplicated in bigquery/google/cloud/bigquery/_pandas_helpers.py
# When modifying it be sure to update it there as well.
Expand Down Expand Up @@ -172,6 +178,9 @@ def test_to_arrow_w_scalars_arrow(class_under_test, mock_gapic_client):
assert actual_table == expected_table


@pytest.mark.skipif(
PANDAS_INSTALLED_VERSION >= pkg_resources.parse_version("2.0.0"), reason=""
)
def test_to_dataframe_w_scalars_arrow(class_under_test, mock_gapic_client):
arrow_schema = _bq_to_arrow_schema(SCALAR_COLUMNS)
arrow_batches = _bq_to_arrow_batches(SCALAR_BLOCKS, arrow_schema)
Expand Down Expand Up @@ -239,6 +248,9 @@ def test_to_dataframe_w_dtypes_arrow(class_under_test, mock_gapic_client):
)


@pytest.mark.skipif(
PANDAS_INSTALLED_VERSION >= pkg_resources.parse_version("2.0.0"), reason=""
)
def test_to_dataframe_empty_w_scalars_arrow(class_under_test, mock_gapic_client):
arrow_schema = _bq_to_arrow_schema(SCALAR_COLUMNS)
read_session = _generate_arrow_read_session(arrow_schema)
Expand Down