Fixed #125: SheerkaErrorManager
Fixed #135: Change services service priorities Fixed #136: ErrorManager: Implement recognize_error Fixed #137: BNFNodeParser : Error when parsing regex with sub parsers Fixed #138: get_last_errors(): real errors sources are lost Fixed #139: OneError return value removes the origin of the error Fixed #140: Concept variables are not correctly handled when parsing sub expression Fixed #143: Implement has_unknown_concepts()
This commit is contained in:
@@ -49,7 +49,8 @@ class TestOneErrorEvaluator(TestUsingMemoryBasedSheerka):
|
||||
res = evaluator.eval(context, return_values)
|
||||
|
||||
assert not res.status
|
||||
assert res.body == "evaluators.one error"
|
||||
assert context.sheerka.isinstance(res.body, BuiltinConcepts.RETURN_VALUE)
|
||||
assert res.body.body == "evaluators.one error"
|
||||
assert len(res.parents) == 4
|
||||
|
||||
def test_unwanted_return_values_are_not_eaten(self):
|
||||
@@ -71,7 +72,8 @@ class TestOneErrorEvaluator(TestUsingMemoryBasedSheerka):
|
||||
res = evaluator.eval(context, return_values)
|
||||
|
||||
assert not res.status
|
||||
assert res.body == "evaluators.one error"
|
||||
assert context.sheerka.isinstance(res.body, BuiltinConcepts.RETURN_VALUE)
|
||||
assert res.body.body == "evaluators.one error"
|
||||
assert len(res.parents) == 4
|
||||
|
||||
assert a_successful_concept not in res.parents
|
||||
@@ -89,7 +91,7 @@ class TestOneErrorEvaluator(TestUsingMemoryBasedSheerka):
|
||||
assert evaluator.matches(context, return_values)
|
||||
res = evaluator.eval(context, return_values)
|
||||
assert not res.status
|
||||
assert res.body == false_1.body
|
||||
assert res.body.body == false_1.body
|
||||
assert res.parents == return_values
|
||||
|
||||
evaluator.reset()
|
||||
@@ -97,7 +99,7 @@ class TestOneErrorEvaluator(TestUsingMemoryBasedSheerka):
|
||||
assert evaluator.matches(context, return_values)
|
||||
res = evaluator.eval(context, return_values)
|
||||
assert not res.status
|
||||
assert res.body == filtered
|
||||
assert res.body.body == filtered
|
||||
assert res.parents == return_values
|
||||
|
||||
evaluator.reset()
|
||||
@@ -105,5 +107,5 @@ class TestOneErrorEvaluator(TestUsingMemoryBasedSheerka):
|
||||
assert evaluator.matches(context, return_values)
|
||||
res = evaluator.eval(context, return_values)
|
||||
assert not res.status
|
||||
assert res.body == false_1.body
|
||||
assert res.body.body == false_1.body
|
||||
assert res.parents == return_values
|
||||
|
||||
Reference in New Issue
Block a user