add mathematical solver engine based on sympy
This commit is contained in:
@@ -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():
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user