Skip to content

Commit 464934f

Browse files
committed
fix the tests
1 parent 1edf87c commit 464934f

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

bigframes/session/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2065,7 +2065,7 @@ def read_gbq_function(
20652065
parameter.
20662066
20672067
>>> @bpd.remote_function(cloud_function_service_account="default")
2068-
... def row_sum(s: bpd.Series) -> float:
2068+
... def row_sum(s: pd.Series) -> float:
20692069
... return s['a'] + s['b'] + s['c']
20702070
20712071
>>> row_sum_ref = bpd.read_gbq_function(

tests/unit/functions/test_remote_function.py

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,12 @@
1717
import pandas
1818
import pytest
1919

20+
import bigframes.exceptions
2021
import bigframes.functions.function as bff
21-
import bigframes.series
2222
from bigframes.testing import mocks
2323

2424

25-
@pytest.mark.parametrize(
26-
"series_type",
27-
(
28-
pytest.param(
29-
pandas.Series,
30-
id="pandas.Series",
31-
),
32-
pytest.param(
33-
bigframes.series.Series,
34-
id="bigframes.series.Series",
35-
),
36-
),
37-
)
38-
def test_series_input_types_to_str(series_type):
25+
def test_series_input_types_to_str():
3926
"""Check that is_row_processor=True uses str as the input type to serialize a row."""
4027
session = mocks.create_bigquery_session()
4128
remote_function_decorator = bff.remote_function(
@@ -48,7 +35,7 @@ def test_series_input_types_to_str(series_type):
4835
):
4936

5037
@remote_function_decorator
51-
def axis_1_function(myparam: series_type) -> str: # type: ignore
38+
def axis_1_function(myparam: pandas.Series) -> str: # type: ignore
5239
return "Hello, " + myparam["str_col"] + "!" # type: ignore
5340

5441
# Still works as a normal function.

0 commit comments

Comments
 (0)