Implemented some enhancement request and fixed some bugs

Fixed #2 : Variables are not recognized when inside a rule token
Fixed #15 : Rule: rete attributes are lost when a new ontology is created
Fixed #14 : ReteNetwork: Format rules must not be added to Rete network
Fixed #16 : DefConcept: Variables are not recognized when they are keyword arguments
Fixed #4 : Comparison are not correctly set when comparison property is a concept
Fixed #14 : Parser: merge FunctionParser.NamesNode and ExpressionParser.NamesNode
Fixed #18 : Parser: Add SourceCodeNode test to UnrecognizedNodeParser
Fixed #20 : At startup Number concept is saved in db a numerous number of time
Fixed #21 : CacheManager: I can remove all elements from a ListIfNeededCache and fill it again
Fixed #22 : CacheManager: I can remove all elements from a SetCache and fill it again
Fixed #23 : HistoryManager: history() no longer works
Fixed #24 : HistoryManager: history() no longer works after creating an exec rule
Fixed #25 : SheerkaMemory: Use MemoryObject instead of sheerka.local
Fixed #26 : Debugger: add the list all available services..
Fixed #27 : CONCEPTS_GRAMMARS_ENTRY does not seems to be in use any more
Fixed #28 : Give order to services
This commit is contained in:
2021-02-12 15:15:31 +01:00
parent 3a12ea58df
commit cac2dad17f
62 changed files with 1182 additions and 480 deletions
+9 -2
View File
@@ -104,8 +104,12 @@ class BaseTest:
def get_sheerka(self, **kwargs) -> Sheerka:
pass
def get_context(self, sheerka=None, eval_body=False, eval_where=False):
context = ExecutionContext("test", Event(), sheerka or self.get_sheerka(), BuiltinConcepts.TESTING, None)
def get_context(self, sheerka=None, eval_body=False, eval_where=False, message=""):
context = ExecutionContext("test",
Event(message=message),
sheerka or self.get_sheerka(),
BuiltinConcepts.TESTING,
None)
if eval_body:
context.protected_hints.add(BuiltinConcepts.EVAL_BODY_REQUESTED)
if eval_where:
@@ -158,6 +162,9 @@ class BaseTest:
def init_format_rules(self, *rules, **kwargs):
return self.init_test(**kwargs).with_format_rules(*rules, **kwargs).unpack()
def init_exec_rules(self, *rules, **kwargs):
return self.init_test(**kwargs).with_exec_rules(*rules, **kwargs).unpack()
@staticmethod
def get_concept_instance(sheerka, concept, **kwargs):
"""