Files
AutoMetabuilder/backend/autometabuilder/workflow/plugins/test/test_assert_false.py
copilot-swe-agent[bot] 3175a4187f Add unit testing workflow plugins and test packages
- Created var plugin directory with get, set, delete, exists plugins
- Created test plugin directory with assert_equals, assert_true, assert_false, assert_exists, run_suite plugins
- Updated plugin_map.json to register all new plugins (90 total plugins now)
- Created 5 test packages: logic_plugins_test, math_plugins_test, string_plugins_test, list_plugins_test, dict_plugins_test
- Added comprehensive unit tests for all new plugins
- Updated documentation with test plugin information
- All tests passing (16 workflow plugin tests + 11 unit testing plugin tests)

Co-authored-by: johndoe6345789 <224850594+johndoe6345789@users.noreply.github.com>
2026-01-10 13:53:51 +00:00

24 lines
579 B
Python

"""Workflow plugin: assert value is false."""
def run(_runtime, inputs):
"""Assert that a value is false."""
value = inputs.get("value")
message = inputs.get("message", "")
passed = value is False
if not passed:
error_msg = f"Assertion failed: {message}" if message else "Assertion failed"
error_msg += f"\n Expected: False\n Actual: {value}"
return {
"passed": False,
"error": error_msg,
"value": value
}
return {
"passed": True,
"value": value
}