[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: consolidate PyarrowVersions helpers #1679

Merged
merged 16 commits into from
Oct 18, 2023
Prev Previous commit
Next Next commit
accept suggestion
Co-authored-by: Tim Swast <swast@google.com>
  • Loading branch information
Linchin and tswast committed Oct 17, 2023
commit b6cec0858d90bcca2fa07de5d2e184fe4d236d97
7 changes: 1 addition & 6 deletions tests/unit/test__pyarrow_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@
import pytest


try:
import pyarrow
except ImportError: # pragma: NO COVER
pyarrow = None
pyarrow = pytest.importorskip("pyarrow", minversion="3.0.0")


@pytest.fixture
Expand All @@ -28,7 +25,6 @@ def module_under_test():
return _pyarrow_helpers


@pytest.mark.skipIf(pyarrow is None, reason="Requires `pyarrow`")
def test_bq_to_arrow_scalars(module_under_test):
assert (
module_under_test.bq_to_arrow_scalars("BIGNUMERIC")
Expand All @@ -37,7 +33,6 @@ def test_bq_to_arrow_scalars(module_under_test):
assert module_under_test.bq_to_arrow_scalars("UNKNOWN_TYPE") is None


@pytest.mark.skipIf(pyarrow is None, reason="Requires `pyarrow`")
def test_arrow_scalar_ids_to_bq(module_under_test):
assert module_under_test.arrow_scalar_ids_to_bq(pyarrow.bool_().id) == "BOOL"
assert module_under_test.arrow_scalar_ids_to_bq("UNKNOWN_TYPE") is None