Skip to content

Commit 4d110d7

Browse files
committed
fix failed test
1 parent 7c784cc commit 4d110d7

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

tests/system/large/operations/test_semantics.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
import bigframes
2323
from bigframes import dataframe, dtypes, exceptions, series
2424

25-
pytest.skip(
26-
"Semantics namespace is deprecated. ",
27-
allow_module_level=True,
28-
)
25+
# pytest.skip(
26+
# "Semantics namespace is deprecated. ",
27+
# allow_module_level=True,
28+
# )
2929

3030
SEM_OP_EXP_OPTION = "experiments.semantic_operators"
3131
BLOB_EXP_OPTION = "experiments.blob"
@@ -86,7 +86,7 @@ def test_agg(session, gemini_flash_model, max_agg_rows, cluster_column):
8686
cluster_column=cluster_column,
8787
).to_pandas()
8888

89-
expected_s = pd.Series(["Leonardo \n"], dtype=dtypes.STRING_DTYPE)
89+
expected_s = pd.Series(["Leonardo\n"], dtype=dtypes.STRING_DTYPE)
9090
expected_s.name = "Movies"
9191
pandas.testing.assert_series_equal(actual_s, expected_s, check_index_type=False)
9292

@@ -137,12 +137,13 @@ def test_agg_w_int_column(session, gemini_flash_model):
137137
"Movies": [
138138
"Killers of the Flower Moon",
139139
"The Great Gatsby",
140+
"The Wolf of Wall Street",
140141
],
141-
"Years": [2023, 2013],
142+
"Years": [2023, 2013, 2013],
142143
},
143144
session=session,
144145
)
145-
instruction = "Find the {Years} Leonardo DiCaprio acted in the most movies. Answer with the year only."
146+
instruction = "Find the {Years} Leonardo DiCaprio acted in the most movies. Your answer should be the four-digit year, returned as a string."
146147

147148
with bigframes.option_context(
148149
SEM_OP_EXP_OPTION,
@@ -155,7 +156,7 @@ def test_agg_w_int_column(session, gemini_flash_model):
155156
model=gemini_flash_model,
156157
).to_pandas()
157158

158-
expected_s = pd.Series(["2013 \n"], dtype=dtypes.STRING_DTYPE)
159+
expected_s = pd.Series(["2013\n"], dtype=dtypes.STRING_DTYPE)
159160
expected_s.name = "Years"
160161
pandas.testing.assert_series_equal(actual_s, expected_s, check_index_type=False)
161162

@@ -764,7 +765,7 @@ def test_join_with_confirmation(session, gemini_flash_model, reply, monkeypatch)
764765
def test_self_join(session, gemini_flash_model):
765766
animals = dataframe.DataFrame(
766767
data={
767-
"animal": ["spider", "capybara"],
768+
"animal": ["ant", "elephant"],
768769
},
769770
session=session,
770771
)
@@ -783,8 +784,8 @@ def test_self_join(session, gemini_flash_model):
783784

784785
expected_df = pd.DataFrame(
785786
{
786-
"animal_left": ["capybara"],
787-
"animal_right": ["spider"],
787+
"animal_left": ["elephant"],
788+
"animal_right": ["ant"],
788789
}
789790
)
790791
pandas.testing.assert_frame_equal(

0 commit comments

Comments
 (0)