Fixed #12
Fixed #13
Fixed #14
This commit is contained in:
2023-05-08 17:50:28 +02:00
parent 21a397861a
commit e41094f908
95 changed files with 12168 additions and 260 deletions
View File
@@ -0,0 +1,23 @@
import pytest
from base import BaseTest
from core.BuiltinConcepts import BuiltinConcepts
from evaluators.CreateParserInput import CreateParserInput
from helpers import _rv, _rvf
class TestCreateParserInput(BaseTest):
@pytest.fixture()
def evaluator(self, sheerka):
return sheerka.evaluators[CreateParserInput.NAME]
def test_i_can_match(self, sheerka, context, evaluator):
ret_val = _rv(sheerka.newn(BuiltinConcepts.USER_INPUT, command="hello sheerka"))
assert evaluator.matches(context, ret_val).status is True
ret_val = _rv(sheerka.newn(BuiltinConcepts.UNKNOWN_CONCEPT)) # it responds to USER_INPUT only
assert evaluator.matches(context, ret_val).status is False
ret_val = _rvf(sheerka.newn(BuiltinConcepts.USER_INPUT, command="hello sheerka")) # status should be true
assert evaluator.matches(context, ret_val).status is False