add mathematical solver engine based on sympy

This commit is contained in:
2025-01-02 00:45:03 +01:00
parent fd7e3d5235
commit fe9c738891
7 changed files with 410 additions and 18 deletions

View File

@@ -3,19 +3,16 @@ import tool_helper
import tests.helper as helper
def test_tool_function_decorator_if_clean_tool_list():
""" tests for the tool list to be empty. NOT strictly nessesary,
but I want to be warned if this is not the case anymore. Could be not the intention """
start_len = len(tool_helper.tool_list)
assert start_len == 0
def test_tool_function_decorator():
# get length before adding tools
start_len = len(tool_helper.tool_list)
# add tools like it would be a decorator
tool_helper.tool(helper.tool_dummy)
tool_helper.tool(helper.tool_dummy2)
res = tool_helper.tool(helper.tool_dummy)
assert res == helper.tool_dummy # decorator should return the function itself, so it is usable just in case.
res = tool_helper.tool(helper.tool_dummy2)
assert res == helper.tool_dummy2 # decorator should return the function itself, so it is usable just in case.
# get length after adding tools
end_len = len(tool_helper.tool_list)
@@ -28,3 +25,4 @@ def test_tool_function_decorator():