Skip to content

Commit 4d8f631

Browse files
committed
fix: align test assertions with actual template implementation
Update test_template_handles_non_registerable_modules to check for the actual exception handling pattern used in _AGENT_ENGINE_APP_TEMPLATE: - Changed assertion from "except Exception:" to "except Exception as e:" - Changed assertion from "pass" to "_logger.debug" to match the logging behavior in the template
1 parent 0f841c5 commit 4d8f631

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/unittests/cli/utils/test_cli_deploy.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -646,8 +646,8 @@ def test_template_handles_non_registerable_modules(self) -> None:
646646
"""Template should handle modules that can't be registered gracefully."""
647647
template = cli_deploy._AGENT_ENGINE_APP_TEMPLATE
648648
# Verify it catches exceptions from register_pickle_by_value
649-
assert "except Exception:" in template
650-
assert "pass" in template
649+
assert "except Exception as e:" in template
650+
assert "_logger.debug" in template
651651

652652
def test_template_skips_cloudpickle_for_config_agents(self) -> None:
653653
"""Config agents should not have cloudpickle registration."""

0 commit comments

Comments
 (0)