Fixed #101 : Implement PLURIAL

Fixed #103 : Implement PlurialNodeParser
Fixed #104 : Implement dynamic concept
Fixed #107 : PrepareEvalxxxEvaluator: context hints are lost on a second evaluation
This commit is contained in:
2021-08-05 19:07:21 +02:00
parent c798c2c570
commit 71d1b1d1ca
31 changed files with 600 additions and 105 deletions
+17
View File
@@ -9,7 +9,10 @@ class TestSheerkaHasAManager(TestUsingMemoryBasedSheerka):
king_instance = sheerka.new("king")
res = sheerka.set_hasa(context, king_instance, kingdom)
assert res.status
assert king_instance.get_prop(BuiltinConcepts.HASA) == {kingdom}
assert sheerka.hasa(king_instance, kingdom)
# when global truth is not activated, only the current instance is modified
another_king = sheerka.get_by_key("king")
@@ -56,3 +59,17 @@ class TestSheerkaHasAManager(TestUsingMemoryBasedSheerka):
assert res.body.property_name == BuiltinConcepts.HASA
assert res.body.property_value == kingdom
assert res.body.concept == sheerka.new("king")
def test_i_can_set_hase_twice_when_global_truth_is_true_the_second_time(self):
sheerka, context, king, kingdom = self.init_concepts("king", "kingdom")
global_truth_context = self.get_context(sheerka, global_truth=True)
king_instance = sheerka.new("king")
sheerka.set_hasa(context, king_instance, kingdom)
# set it again with global_truth = True
res = sheerka.set_hasa(global_truth_context, king_instance, kingdom)
assert res.status
assert sheerka.hasa(king_instance, kingdom)
assert sheerka.hasa(sheerka.new("king"), kingdom) # try another instance