Skip to content

Commit

Permalink
Typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jsikorski committed Nov 29, 2024
1 parent 05c5de2 commit d73fb72
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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."
)
Expand Down
29 changes: 0 additions & 29 deletions tests/snowpark/__snapshots__/test_function.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 17 additions & 3 deletions tests/snowpark/test_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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
Expand All @@ -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(
Expand Down

0 comments on commit d73fb72

Please sign in to comment.