Skip to content

Commit

Permalink
Fix test_invalid_ge_schema_batchrequest_pandas_config (#3145)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Su <[email protected]>
  • Loading branch information
pingsutw authored Feb 20, 2025
1 parent 58ea1a5 commit b557dfe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion flytekit/core/type_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1532,7 +1532,6 @@ async def _literal_map_to_kwargs(
raise TypeTransformerFailedError(
f"Error converting input '{k}' at position {i}:\n"
f"Literal value: {lm.literals[k]}\n"
f"Literal type: {literal_types}\n"
f"Expected Python type: {python_interface_inputs[k]}\n"
f"Exception: {e}"
)
Expand Down
6 changes: 4 additions & 2 deletions plugins/flytekit-greatexpectations/tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

import pandas as pd
import pytest

from flytekit.core.type_engine import TypeTransformerFailedError
from flytekitplugins.great_expectations import BatchRequestConfig, GreatExpectationsFlyteConfig, GreatExpectationsType
from great_expectations.exceptions import InvalidBatchRequestError, ValidationError

Expand Down Expand Up @@ -58,7 +60,7 @@ def invalid_wf(dataset: str = "yellow_tripdata_sample_2019-02.csv") -> int:
valid_result = valid_wf()
assert valid_result == 9999

with pytest.raises(ValidationError):
with pytest.raises(TypeTransformerFailedError):
invalid_wf()


Expand Down Expand Up @@ -144,7 +146,7 @@ def my_wf():
my_task(directory="my_assets")

# Capture IndexError
with pytest.raises(InvalidBatchRequestError):
with pytest.raises(TypeTransformerFailedError):
my_wf()


Expand Down
2 changes: 1 addition & 1 deletion tests/flytekit/integration/remote/test_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ def test_attr_access_sd():
remote = FlyteRemote(Config.auto(config_file=CONFIG), PROJECT, DOMAIN)
execution = remote.fetch_execution(name=execution_id)
execution = remote.wait(execution=execution, timeout=datetime.timedelta(minutes=5))
print("Execution Error:", execution.error)
assert execution.error is None, f"Execution failed with error: {execution.error}"
assert execution.closure.phase == WorkflowExecutionPhase.SUCCEEDED, f"Execution failed with phase: {execution.closure.phase}"

# Delete the remote file to free the space
Expand Down

0 comments on commit b557dfe

Please sign in to comment.