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:
@@ -345,23 +345,23 @@ class TestSheerkaRuleManager(TestUsingMemoryBasedSheerka):
|
||||
("not __ret.status", "__ret", [NEGCOND("#__x_00__|__name__|'__ret.status'")]),
|
||||
("__ret and not __ret.status", "__ret",
|
||||
["#__x_00__|__name__|'__ret'", NEGCOND("#__x_01__|__name__|'__ret.status'")]),
|
||||
("not recognize(__ret.body, hello sheerka)", "__ret", ["#__x_00__|__name__|'__ret'",
|
||||
NCCOND(["#__x_00__|body|#__x_01__",
|
||||
"#__x_01__|__is_concept__|True",
|
||||
"#__x_01__|key|'hello __var__0'",
|
||||
"#__x_01__|a|'__sheerka__'"])]),
|
||||
("__ret and not __error", "__ret", ["#__x_00__|__name__|'__ret'", NEGCOND("#__x_01__|__name__|'__error'")]),
|
||||
("not recognize(self, hello sheerka)", "__ret", ["#__x_00__|__name__|'self'",
|
||||
NCCOND(["#__x_00__|__is_concept__|True",
|
||||
"#__x_00__|key|'hello __var__0'",
|
||||
"#__x_00__|a|'__sheerka__'"])]),
|
||||
# ("not recognize(__ret.body, hello sheerka)", "__ret", ["#__x_00__|__name__|'__ret'",
|
||||
# NCCOND(["#__x_00__|body|#__x_01__",
|
||||
# "#__x_01__|__is_concept__|True",
|
||||
# "#__x_01__|key|'hello __var__0'",
|
||||
# "#__x_01__|a|'__sheerka__'"])]),
|
||||
# ("not recognize(self, hello sheerka)", "__ret", ["#__x_00__|__name__|'self'",
|
||||
# NCCOND(["#__x_00__|__is_concept__|True",
|
||||
# "#__x_00__|key|'hello __var__0'",
|
||||
# "#__x_00__|a|'__sheerka__'"])]),
|
||||
])
|
||||
def test_i_can_get_rete_using_not(self, expression, bag_key, expected):
|
||||
sheerka, context, greetings, foo = self.init_test().with_concepts(
|
||||
Concept("greetings", definition="hello a", definition_type=DEFINITION_TYPE_DEF).def_var("a"),
|
||||
Concept("foo"),
|
||||
).unpack()
|
||||
parser = ExpressionParser(old_style=True)
|
||||
parser = ExpressionParser()
|
||||
expected_conditions = get_rete_conditions(*expected)
|
||||
|
||||
error_sink = ErrorSink()
|
||||
|
||||
Reference in New Issue
Block a user