Working on #98 : Persist attribute value when global_truth is set to true

This commit is contained in:
2021-08-03 11:26:57 +02:00
parent e69745adc8
commit c798c2c570
22 changed files with 496 additions and 106 deletions
+1 -9
View File
@@ -314,7 +314,7 @@ class TestSheerkaEvaluateConcept(TestUsingMemoryBasedSheerka):
def test_i_can_evaluate_when_variable_asts_is_a_list(self):
sheerka = self.get_sheerka()
foo = Concept("foo", body="1")
foo = Concept("foo", body="1").init_key()
concept = Concept("to_eval").def_var("prop")
concept.get_compiled()["prop"] = [foo, DoNotResolve("1")]
@@ -467,14 +467,6 @@ class TestSheerkaEvaluateConcept(TestUsingMemoryBasedSheerka):
evaluated = sheerka.evaluate_concept(self.get_context(sheerka, True), concept)
assert sheerka.isinstance(evaluated, BuiltinConcepts.CONCEPT_EVAL_ERROR)
def test_key_is_initialized_by_evaluation(self):
sheerka = self.get_sheerka()
concept = Concept("foo")
evaluated = sheerka.evaluate_concept(self.get_context(sheerka, True), concept)
assert evaluated.key == concept.init_key().key
@pytest.mark.parametrize("where_clause, expected, expected_prop, expected_body", [
("True", True, None, NotInit),
("False", False, ConceptParts.WHERE, NotInit),