Fixed parsing of BNF concepts mixed with isaset concepts
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import pytest
|
||||
from core.builtin_concepts import BuiltinConcepts
|
||||
from core.concept import Concept, PROPERTIES_TO_SERIALIZE, simplec, CMV
|
||||
from core.concept import Concept, PROPERTIES_TO_SERIALIZE, simplec, CMV, NotInit
|
||||
from evaluators.MutipleSameSuccessEvaluator import MultipleSameSuccessEvaluator
|
||||
from evaluators.PythonEvaluator import PythonEvalError
|
||||
from parsers.BaseNodeParser import SyaAssociativity
|
||||
@@ -319,7 +319,7 @@ as:
|
||||
assert res[0].status
|
||||
concept_found = res[0].value
|
||||
assert sheerka.isinstance(concept_found, greetings)
|
||||
assert concept_found.get_value("a") is None
|
||||
assert concept_found.get_value("a") == NotInit
|
||||
assert not concept_found.metadata.need_validation
|
||||
|
||||
@pytest.mark.parametrize("desc, definitions", [
|
||||
@@ -898,8 +898,8 @@ as:
|
||||
res = sheerka.evaluate_user_input(expression)
|
||||
assert res[0].status
|
||||
assert res[0].body == CMV(plus, a="c:one:", b="c:two:")
|
||||
assert res[0].body.a is None # concept is not evaluated
|
||||
assert res[0].body.b is None # concept is not evaluated
|
||||
assert res[0].body.a == NotInit # concept is not evaluated
|
||||
assert res[0].body.b == NotInit # concept is not evaluated
|
||||
|
||||
expression = "eval c:one: < c:two:"
|
||||
res = sheerka.evaluate_user_input(expression)
|
||||
|
||||
Reference in New Issue
Block a user