First implementation of questions management
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
from core.builtin_concepts import BuiltinConcepts
|
||||
from core.concept import Concept
|
||||
from evaluators.ResolveAmbiguityEvaluator import ResolveAmbiguityEvaluator
|
||||
|
||||
@@ -67,8 +68,26 @@ class TestResolveAmbiguityEvaluator(TestUsingMemoryBasedSheerka):
|
||||
resolved = res[0]
|
||||
|
||||
assert resolved.who == evaluator.name
|
||||
assert resolved.body == []
|
||||
assert resolved.body == BuiltinConcepts.NO_RESULT
|
||||
assert resolved.parents == [
|
||||
return_values[0],
|
||||
return_values[1],
|
||||
]
|
||||
|
||||
def test_i_can_eval_all_pass(self):
|
||||
"""
|
||||
If they all pass, that means that no concept was reduced
|
||||
-> We need to act like resolve ambiguity was not called
|
||||
:return:
|
||||
"""
|
||||
context = self.get_context()
|
||||
return_values = [
|
||||
self.pretval(Concept("hello world 1"), "hello word"),
|
||||
self.pretval(Concept("hello world 2"), "hello word"),
|
||||
]
|
||||
|
||||
evaluator = ResolveAmbiguityEvaluator()
|
||||
evaluator.matches(context, return_values)
|
||||
res = evaluator.eval(context, return_values)
|
||||
|
||||
assert res is None
|
||||
|
||||
Reference in New Issue
Block a user