Skip to content

Commit bb3a4d3

Browse files
committed
fix the tests
1 parent 4d7d721 commit bb3a4d3

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

bigframes/dataframe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4839,7 +4839,7 @@ def apply(self, func, *, axis=0, args: typing.Tuple = (), **kwargs):
48394839
f"Parameter count mismatch: BigFrames BigQuery function"
48404840
f" expected {len(udf_input_dtypes)} parameters but"
48414841
f" received {len(self.columns) + len(args)} values"
4842-
f" ({len(self.columns)} DataFrame coulmns and"
4842+
f" ({len(self.columns)} DataFrame columns and"
48434843
f" {len(args)} args)."
48444844
)
48454845
end_slice = -len(args) if args else None

tests/system/large/functions/test_managed_function.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -468,13 +468,13 @@ def foo(x, y, z):
468468
# Fails to apply on dataframe with incompatible number of columns.
469469
with pytest.raises(
470470
ValueError,
471-
match="^Parameter count mismatch:.* expected 3 parameters but received 2 DataFrame.*",
471+
match="^Parameter count mismatch:.* expected 3 parameters but received 2 DataFrame columns.",
472472
):
473473
bf_df[["Id", "Age"]].apply(foo, axis=1)
474474

475475
with pytest.raises(
476476
ValueError,
477-
match="^Parameter count mismatch:.* expected 3 parameters but received 4 DataFrame.*",
477+
match="^Parameter count mismatch:.* expected 3 parameters but received 4 DataFrame columns.",
478478
):
479479
bf_df.assign(Country="lalaland").apply(foo, axis=1)
480480

@@ -983,10 +983,10 @@ def the_sum(s1, s2, x):
983983

984984
args1 = (1,)
985985

986-
# Fails to apply on dataframe with incompatible number of columns.
986+
# Fails to apply on dataframe with incompatible number of columns and args.
987987
with pytest.raises(
988988
ValueError,
989-
match="^Parameter count mismatch:.* expected 3 parameters but received 4 values.*",
989+
match="^Parameter count mismatch:.* expected 3 parameters but received 4 values \\(3 DataFrame columns and 1 args\\)",
990990
):
991991
scalars_df[columns + ["float64_col"]].apply(the_sum_mf, axis=1, args=args1)
992992

tests/system/large/functions/test_remote_function.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1956,10 +1956,10 @@ def the_sum(s1, s2, x):
19561956

19571957
args1 = (1,)
19581958

1959-
# Fails to apply on dataframe with incompatible number of columns.
1959+
# Fails to apply on dataframe with incompatible number of columns and args.
19601960
with pytest.raises(
19611961
ValueError,
1962-
match="^Parameter count mismatch:.* expected 3 parameters but received 4 values.*",
1962+
match="^Parameter count mismatch:.* expected 3 parameters but received 4 values \\(2 DataFrame columns and 2 args\\)",
19631963
):
19641964
scalars_df[columns].apply(
19651965
the_sum_mf,
@@ -2308,12 +2308,12 @@ def foo(x, y, z):
23082308
# Fails to apply on dataframe with incompatible number of columns
23092309
with pytest.raises(
23102310
ValueError,
2311-
match="^Parameter count mismatch:.* expected 3 parameters but received 2 DataFrame.*",
2311+
match="^Parameter count mismatch:.* expected 3 parameters but received 2 DataFrame columns.",
23122312
):
23132313
bf_df[["Id", "Age"]].apply(foo, axis=1)
23142314
with pytest.raises(
23152315
ValueError,
2316-
match="^Parameter count mismatch:.* expected 3 parameters but received 4 DataFrame.*",
2316+
match="^Parameter count mismatch:.* expected 3 parameters but received 4 DataFrame columns.",
23172317
):
23182318
bf_df.assign(Country="lalaland").apply(foo, axis=1)
23192319

@@ -2392,12 +2392,12 @@ def foo(x, y, z):
23922392
# Fails to apply on dataframe with incompatible number of columns
23932393
with pytest.raises(
23942394
ValueError,
2395-
match="^Parameter count mismatch:.* expected 3 parameters but received 2 DataFrame.*",
2395+
match="^Parameter count mismatch:.* expected 3 parameters but received 2 DataFrame columns.",
23962396
):
23972397
bf_df[["Id", "Age"]].apply(foo, axis=1)
23982398
with pytest.raises(
23992399
ValueError,
2400-
match="^Parameter count mismatch:.* expected 3 parameters but received 4 DataFrame.*",
2400+
match="^Parameter count mismatch:.* expected 3 parameters but received 4 DataFrame columns.",
24012401
):
24022402
bf_df.assign(Country="lalaland").apply(foo, axis=1)
24032403

0 commit comments

Comments
 (0)