fixed #18 : I can evaluate concept

This commit is contained in:
2023-06-01 22:08:34 +02:00
parent 09a0246420
commit 62391f786e
25 changed files with 1503 additions and 314 deletions
+8 -7
View File
@@ -40,13 +40,14 @@ class TestPythonEvaluator(BaseTest):
("a=10\na", 10),
])
def test_i_can_evaluate_simple_expression(self, sheerka, context, evaluator, text, expected):
start = get_parser_input_from(sheerka, context, text)
ret = evaluator.eval(context, None, start)
assert ret.eaten == [start]
assert len(ret.new) == 1
assert ret.new[0].status is True
assert ret.new[0].value == expected
assert ret.new[0].parents == [start]
with NewOntology(context, "test_i_can_evaluate_simple_expression"):
start = get_parser_input_from(sheerka, context, text)
ret = evaluator.eval(context, None, start)
assert ret.eaten == [start]
assert len(ret.new) == 1
assert ret.new[0].status is True
assert ret.new[0].value == expected
assert ret.new[0].parents == [start]
def test_i_can_detect_evaluation_error(self, sheerka, context, evaluator):
start = get_parser_input_from(sheerka, context, "a")