fixed #18 : I can evaluate concept
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user