diff --git a/tests/system/large/ml/test_ensemble.py b/tests/system/large/ml/test_ensemble.py index e00f7fa665..706cbfdfaf 100644 --- a/tests/system/large/ml/test_ensemble.py +++ b/tests/system/large/ml/test_ensemble.py @@ -395,7 +395,7 @@ def test_randomforestclassifier_multiple_params(penguins_df_default_index, datas f"{dataset_id}.temp_configured_randomforestclassifier_model" in reloaded_model._bqml_model.model_name ) - assert reloaded_model.tree_method == "auto" + assert reloaded_model.tree_method.casefold() == "auto" assert reloaded_model.colsample_bytree == 0.95 assert reloaded_model.colsample_bylevel == 0.95 assert reloaded_model.colsample_bynode == 0.95 diff --git a/tests/system/large/test_remote_function.py b/tests/system/large/test_remote_function.py index 4114eaae03..cce49ea187 100644 --- a/tests/system/large/test_remote_function.py +++ b/tests/system/large/test_remote_function.py @@ -21,7 +21,7 @@ import tempfile import textwrap -from google.api_core.exceptions import BadRequest, InvalidArgument, NotFound +import google.api_core.exceptions from google.cloud import bigquery, storage import pandas import pytest @@ -849,7 +849,7 @@ def square(x): expected_remote_function = f"{dataset_id}.{rf_name}" # Initially the expected BQ remote function should not exist - with pytest.raises(NotFound): + with pytest.raises(google.api_core.exceptions.NotFound): session.bqclient.get_routine(expected_remote_function) # Create the remote function with the name provided explicitly @@ -981,7 +981,7 @@ def test_internal(rf, udf): expected_remote_function = f"{dataset_id}.{rf_name}" # Initially the expected BQ remote function should not exist - with pytest.raises(NotFound): + with pytest.raises(google.api_core.exceptions.NotFound): session.bqclient.get_routine(expected_remote_function) # Create a new remote function with the name provided explicitly @@ -1198,7 +1198,8 @@ def square(x): scalars_df, _ = scalars_dfs with pytest.raises( - BadRequest, match="400.*errorMessage.*unsupported operand type" + google.api_core.exceptions.BadRequest, + match="400.*errorMessage.*unsupported operand type", ): # int64_col has nulls which should cause error in square scalars_df["int64_col"].apply(square).to_pandas() @@ -1431,20 +1432,6 @@ def square_num(x): ) -def test_remote_function_via_session_vpc_invalid(session): - with pytest.raises( - InvalidArgument, match="400.*Serverless VPC Access connector is not found" - ): - - @session.remote_function( - [int], int, reuse=False, cloud_function_vpc_connector="does-not-exist" - ) - def square_num(x): - if x is None: - return x - return x * x - - @pytest.mark.parametrize( ("max_batching_rows"), [