From d73fb72f578f9c9de92ebf66e14c872351a411ea Mon Sep 17 00:00:00 2001 From: Jan Sikorski Date: Fri, 29 Nov 2024 15:11:59 +0100 Subject: [PATCH] Typo fixes --- .../streamlit/streamlit_entity_model.py | 1 - .../snowpark/__snapshots__/test_function.ambr | 29 ------------------- tests/snowpark/test_function.py | 20 +++++++++++-- 3 files changed, 17 insertions(+), 33 deletions(-) diff --git a/src/snowflake/cli/_plugins/streamlit/streamlit_entity_model.py b/src/snowflake/cli/_plugins/streamlit/streamlit_entity_model.py index 459080ae06..55068adb5a 100644 --- a/src/snowflake/cli/_plugins/streamlit/streamlit_entity_model.py +++ b/src/snowflake/cli/_plugins/streamlit/streamlit_entity_model.py @@ -59,7 +59,6 @@ def artifacts_must_exists(self): if "*" in artifact.name: continue if not artifact.exists(): - raise ValueError( f"Specified artifact {artifact} does not exist locally." ) diff --git a/tests/snowpark/__snapshots__/test_function.ambr b/tests/snowpark/__snapshots__/test_function.ambr index 9f704ca1fe..77e6a834e7 100644 --- a/tests/snowpark/__snapshots__/test_function.ambr +++ b/tests/snowpark/__snapshots__/test_function.ambr @@ -28,35 +28,6 @@ ''' # --- -# name: test_deploy_function_fully_qualified_name[snowpark_function_fully_qualified_name][ok] - ''' - Performing initial validation - Checking remote state - Preparing required stages and artifacts - Creating (if not exists) stage: dev_deployment - Uploading app.zip to @MockDatabase.MockSchema.dev_deployment/my_snowpark_project/ - Creating Snowpark entities - Creating function custom_db.custom_schema.fqn_function - Creating function custom_schema.fqn_function_only_schema - Creating function custom_schema.schema_function - Creating function custom_db.PUBLIC.database_function - Creating function custom_db.custom_schema.database_function - Creating function custom_database.custom_schema.fqn_function3 - +------------------------------------------------------------------------------+ - | object | type | status | - |---------------------------------------------------------+----------+---------| - | custom_db.custom_schema.fqn_function(name string) | function | created | - | MockDatabase.custom_schema.fqn_function_only_schema(nam | function | created | - | e string) | | | - | MockDatabase.custom_schema.schema_function(name string) | function | created | - | custom_db.MockSchema.database_function(name string) | function | created | - | custom_db.custom_schema.database_function(name string) | function | created | - | custom_database.custom_schema.fqn_function3(name | function | created | - | string) | | | - +------------------------------------------------------------------------------+ - - ''' -# --- # name: test_deploy_function_fully_qualified_name[snowpark_function_fully_qualified_name_v2-entities.custom_database_custom_schema_fqn_function_error.identifier.name][ok] ''' Performing initial validation diff --git a/tests/snowpark/test_function.py b/tests/snowpark/test_function.py index f264805b67..180c3a9806 100644 --- a/tests/snowpark/test_function.py +++ b/tests/snowpark/test_function.py @@ -446,7 +446,19 @@ def test_deploy_function_fully_qualified_name( @pytest.mark.parametrize( - "project_name", ["snowpark_functions", "snowpark_functions_v2"] + "project_name,signature_path,runtime_path", + [ + ( + "snowpark_functions", + "snowpark.functions.0.signature.0.", + "snowpark.functions.0.runtime", + ), + ( + "snowpark_functions_v2", + "entities.func1.signature.0.", + "entities.func1.runtime", + ), + ], ) @pytest.mark.parametrize( "parameter_type,default_value", @@ -471,6 +483,8 @@ def test_deploy_function_with_empty_default_value( parameter_type, default_value, project_name, + signature_path, + runtime_path, ): mock_object_manager.return_value.describe.side_effect = ProgrammingError( errno=DOES_NOT_EXIST_OR_NOT_AUTHORIZED @@ -482,12 +496,12 @@ def test_deploy_function_with_empty_default_value( for param, value in [("type", parameter_type), ("default", default_value)]: alter_snowflake_yml( snowflake_yml, - parameter_path=f"snowpark.functions.0.signature.0.{param}", + parameter_path=f"{signature_path}{param}", value=value, ) alter_snowflake_yml( snowflake_yml, - parameter_path=f"snowpark.functions.0.runtime", + parameter_path=runtime_path, value="3.10", ) result = runner.invoke(