mirror of
https://github.com/johndoe6345789/AutoMetabuilder.git
synced 2026-05-01 17:24:58 +00:00
- 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>
27 lines
707 B
Python
27 lines
707 B
Python
"""Workflow plugin: assert two values are equal."""
|
|
|
|
|
|
def run(_runtime, inputs):
|
|
"""Assert that two values are equal."""
|
|
actual = inputs.get("actual")
|
|
expected = inputs.get("expected")
|
|
message = inputs.get("message", "")
|
|
|
|
passed = actual == expected
|
|
|
|
if not passed:
|
|
error_msg = f"Assertion failed: {message}" if message else "Assertion failed"
|
|
error_msg += f"\n Expected: {expected}\n Actual: {actual}"
|
|
return {
|
|
"passed": False,
|
|
"error": error_msg,
|
|
"expected": expected,
|
|
"actual": actual
|
|
}
|
|
|
|
return {
|
|
"passed": True,
|
|
"expected": expected,
|
|
"actual": actual
|
|
}
|