2424import bigframes .series
2525from tests .system .utils import assert_pandas_df_equal , get_function_name
2626
27- bpd .options .experiments .udf = True
28-
29-
30- @pytest .mark .skipif (
27+ pytestmark = pytest .mark .skipif (
3128 get_python_version () not in bff_session ._MANAGED_FUNC_PYTHON_VERSIONS ,
3229 reason = f"Supported version: { bff_session ._MANAGED_FUNC_PYTHON_VERSIONS } " ,
3330)
31+
32+
33+ bpd .options .experiments .udf = True
34+
35+
3436@pytest .mark .parametrize (
3537 ("typ" ,),
3638 [
@@ -79,10 +81,6 @@ def foo(x):
7981 assert_pandas_df_equal (bf_result , pd_result , check_dtype = False )
8082
8183
82- @pytest .mark .skipif (
83- get_python_version () not in bff_session ._MANAGED_FUNC_PYTHON_VERSIONS ,
84- reason = f"Supported version: { bff_session ._MANAGED_FUNC_PYTHON_VERSIONS } " ,
85- )
8684def test_managed_function_series_combine (dataset_id_permanent , scalars_dfs ):
8785 # This function is deliberately written to not work with NA input.
8886 def add (x : int , y : int ) -> int :
@@ -127,10 +125,6 @@ def add(x: int, y: int) -> int:
127125 pd .testing .assert_series_equal (pd_result , bf_result , check_dtype = False )
128126
129127
130- @pytest .mark .skipif (
131- get_python_version () not in bff_session ._MANAGED_FUNC_PYTHON_VERSIONS ,
132- reason = f"Supported version: { bff_session ._MANAGED_FUNC_PYTHON_VERSIONS } " ,
133- )
134128@pytest .mark .parametrize (
135129 ("typ" ,),
136130 [
@@ -170,10 +164,6 @@ def foo_list(x):
170164 assert_pandas_df_equal (bf_result , pd_result , check_dtype = False )
171165
172166
173- @pytest .mark .skipif (
174- get_python_version () not in bff_session ._MANAGED_FUNC_PYTHON_VERSIONS ,
175- reason = f"Supported version: { bff_session ._MANAGED_FUNC_PYTHON_VERSIONS } " ,
176- )
177167def test_managed_function_series_combine_list_output (dataset_id_permanent , scalars_dfs ):
178168 def add_list (x : int , y : int ) -> list [int ]:
179169 return [x , y ]
@@ -209,10 +199,6 @@ def add_list(x: int, y: int) -> list[int]:
209199 pd .testing .assert_series_equal (pd_result , bf_result , check_dtype = False )
210200
211201
212- @pytest .mark .skipif (
213- get_python_version () not in bff_session ._MANAGED_FUNC_PYTHON_VERSIONS ,
214- reason = f"Supported version: { bff_session ._MANAGED_FUNC_PYTHON_VERSIONS } " ,
215- )
216202def test_managed_function_dataframe_map (scalars_dfs , dataset_id_permanent ):
217203 def add_one (x ):
218204 return x + 1
@@ -244,10 +230,6 @@ def add_one(x):
244230 assert_pandas_df_equal (bf_result , pd_result )
245231
246232
247- @pytest .mark .skipif (
248- get_python_version () not in bff_session ._MANAGED_FUNC_PYTHON_VERSIONS ,
249- reason = f"Supported version: { bff_session ._MANAGED_FUNC_PYTHON_VERSIONS } " ,
250- )
251233def test_managed_function_dataframe_apply_axis_1 (
252234 session , scalars_dfs , dataset_id_permanent
253235):
@@ -284,10 +266,6 @@ def add_ints(x, y):
284266 )
285267
286268
287- @pytest .mark .skipif (
288- get_python_version () not in bff_session ._MANAGED_FUNC_PYTHON_VERSIONS ,
289- reason = f"Supported version: { bff_session ._MANAGED_FUNC_PYTHON_VERSIONS } " ,
290- )
291269def test_managed_function_dataframe_map_list_output (scalars_dfs , dataset_id_permanent ):
292270 def add_one_list (x ):
293271 return [x + 1 ] * 3
@@ -314,10 +292,6 @@ def add_one_list(x):
314292 assert_pandas_df_equal (bf_result , pd_result , check_dtype = False )
315293
316294
317- @pytest .mark .skipif (
318- get_python_version () not in bff_session ._MANAGED_FUNC_PYTHON_VERSIONS ,
319- reason = f"Supported version: { bff_session ._MANAGED_FUNC_PYTHON_VERSIONS } " ,
320- )
321295def test_managed_function_dataframe_apply_axis_1_list_output (
322296 session , scalars_dfs , dataset_id_permanent
323297):
0 commit comments