24
24
import bigframes .series
25
25
from tests .system .utils import assert_pandas_df_equal , get_function_name
26
26
27
- bpd .options .experiments .udf = True
28
-
29
-
30
- @pytest .mark .skipif (
27
+ pytestmark = pytest .mark .skipif (
31
28
get_python_version () not in bff_session ._MANAGED_FUNC_PYTHON_VERSIONS ,
32
29
reason = f"Supported version: { bff_session ._MANAGED_FUNC_PYTHON_VERSIONS } " ,
33
30
)
31
+
32
+
33
+ bpd .options .experiments .udf = True
34
+
35
+
34
36
@pytest .mark .parametrize (
35
37
("typ" ,),
36
38
[
@@ -79,10 +81,6 @@ def foo(x):
79
81
assert_pandas_df_equal (bf_result , pd_result , check_dtype = False )
80
82
81
83
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
- )
86
84
def test_managed_function_series_combine (dataset_id_permanent , scalars_dfs ):
87
85
# This function is deliberately written to not work with NA input.
88
86
def add (x : int , y : int ) -> int :
@@ -127,10 +125,6 @@ def add(x: int, y: int) -> int:
127
125
pd .testing .assert_series_equal (pd_result , bf_result , check_dtype = False )
128
126
129
127
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
- )
134
128
@pytest .mark .parametrize (
135
129
("typ" ,),
136
130
[
@@ -170,10 +164,6 @@ def foo_list(x):
170
164
assert_pandas_df_equal (bf_result , pd_result , check_dtype = False )
171
165
172
166
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
- )
177
167
def test_managed_function_series_combine_list_output (dataset_id_permanent , scalars_dfs ):
178
168
def add_list (x : int , y : int ) -> list [int ]:
179
169
return [x , y ]
@@ -209,10 +199,6 @@ def add_list(x: int, y: int) -> list[int]:
209
199
pd .testing .assert_series_equal (pd_result , bf_result , check_dtype = False )
210
200
211
201
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
- )
216
202
def test_managed_function_dataframe_map (scalars_dfs , dataset_id_permanent ):
217
203
def add_one (x ):
218
204
return x + 1
@@ -244,10 +230,6 @@ def add_one(x):
244
230
assert_pandas_df_equal (bf_result , pd_result )
245
231
246
232
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
- )
251
233
def test_managed_function_dataframe_apply_axis_1 (
252
234
session , scalars_dfs , dataset_id_permanent
253
235
):
@@ -284,10 +266,6 @@ def add_ints(x, y):
284
266
)
285
267
286
268
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
- )
291
269
def test_managed_function_dataframe_map_list_output (scalars_dfs , dataset_id_permanent ):
292
270
def add_one_list (x ):
293
271
return [x + 1 ] * 3
@@ -314,10 +292,6 @@ def add_one_list(x):
314
292
assert_pandas_df_equal (bf_result , pd_result , check_dtype = False )
315
293
316
294
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
- )
321
295
def test_managed_function_dataframe_apply_axis_1_list_output (
322
296
session , scalars_dfs , dataset_id_permanent
323
297
):
0 commit comments