Fixed #68: Implement SheerkaQL
Fixed #70: SheerkaFilterManager : Pipe functions Fixed #71: SheerkaFilterManager : filter_objects Fixed #75: SheerkaMemory: Enhance memory() to use the filtering capabilities Fixed #76: SheerkaEvaluateConcept: Concepts that modify the state of the system must not be evaluated during question
This commit is contained in:
@@ -182,6 +182,17 @@ class TestBuiltinHelpers(TestUsingMemoryBasedSheerka):
|
||||
concept = Concept("foo", pre=pre)
|
||||
assert core.builtin_helpers.is_a_question(context, concept) == expected
|
||||
|
||||
def test_context_hints_are_reset_when_call_evaluate_from_source(self):
|
||||
sheerka, context, one = self.init_concepts(Concept("one", body="1"))
|
||||
context.add_to_global_hints(BuiltinConcepts.EVAL_BODY_REQUESTED)
|
||||
context.add_to_protected_hints(BuiltinConcepts.EVAL_BODY_REQUESTED)
|
||||
context.add_to_private_hints(BuiltinConcepts.EVAL_BODY_REQUESTED)
|
||||
|
||||
res = core.builtin_helpers.evaluate_from_source(context, "one", eval_body=False)
|
||||
|
||||
evaluated = [r for r in res if r.status][0].body
|
||||
assert evaluated.body is NotInit
|
||||
|
||||
# @pytest.mark.parametrize("return_values", [
|
||||
# None,
|
||||
# []
|
||||
|
||||
Reference in New Issue
Block a user